public AuthenticationBeanBuilder(AuthenticationBean defaultBean) { this.publicKey = defaultBean.getPublicKey(); this.type = defaultBean.getType(); }
public AuthenticationBeanBuilder(AuthenticationBean defaultBean) { this.publicKey = defaultBean.getPublicKey(); this.type = defaultBean.getType(); }
private static boolean addonRequiresAuth(AuthenticationBean authType) { return authType != null && !AuthenticationType.NONE.equals(authType.getType()); }
private boolean isJsonJwtAddon(ShallowConnectAddon addonBean) { return addonBean.getAuthentication() != null && addonBean.getAuthentication().getType() == AuthenticationType.JWT; }
private boolean isJsonJwtAddon(ConnectAddonBean addonBean) { return addonBean.getAuthentication() != null && addonBean.getAuthentication().getType() == AuthenticationType.JWT; }
private boolean addonUsesSymmetricSharedSecret(ShallowConnectAddonBean addonBean, SigningAlgorithm jwtAlgorithm) { AuthenticationBean authenticationBean = addonBean.getAuthentication(); return null != authenticationBean && addonUsesSymmetricSharedSecret(authenticationBean.getType(), jwtAlgorithm); }
private boolean addonUsesSymmetricSharedSecret(ConnectAddonBean addonBean, SigningAlgorithm jwtAlgorithm) { AuthenticationBean authenticationBean = addonBean.getAuthentication(); return null != authenticationBean && addonUsesSymmetricSharedSecret(authenticationBean.getType(), jwtAlgorithm); }
private static boolean addonUsesJwtAuthentication(ShallowConnectAddonBean addon) { return null != addon.getAuthentication() && AuthenticationType.JWT.equals(addon.getAuthentication().getType()); }
private static boolean addonRequiresAuth(ConnectAddonBean addon) { return addon.getAuthentication() != null && !AuthenticationType.NONE.equals(addon.getAuthentication().getType()); }
private static boolean addonUsesJwtAuthentication(ConnectAddonBean addon) { return null != addon.getAuthentication() && AuthenticationType.JWT.equals(addon.getAuthentication().getType()); }
@Override public void validate(final ShallowConnectAddonBean addon) throws InvalidDescriptorException { if (addon.getAuthentication().getType() == JWT && !hasInstalledCallback(addon)) { throw new InvalidDescriptorException("The add-on (" + addon.getKey() + ") requested authentication " + "but did not specify an installed lifecycle callback in its descriptor.", "connect.install.error.auth.with.no.installed.callback"); } }
@Override public void validate(final ShallowConnectAddonBean addon) throws InvalidDescriptorException { if (addon.getAuthentication().getType() == JWT && !hasInstalledCallback(addon)) { throw new InvalidDescriptorException("The add-on (" + addon.getKey() + ") requested authentication " + "but did not specify an installed lifecycle callback in its descriptor.", "connect.install.error.auth.with.no.installed.callback"); } }
String previousDescriptor = addonRegistry.getDescriptor(pluginKey); AuthenticationType newAuthType = addon.getAuthentication().getType(); final boolean newUseSharedSecret = addonUsesSymmetricSharedSecret(newAuthType, JWT_ALGORITHM); final Optional<OAuthClient> newOAuthClient = getUpdatedOAuthClient(pluginKey,
final Optional<String> maybePreviousDescriptor = addonRegistry.getDescriptor(pluginKey); final AuthenticationType newAuthType = addon.getAuthentication().getType(); final boolean newUseSharedSecret = addonUsesSymmetricSharedSecret(newAuthType, JWT_ALGORITHM);