@Override public final void populateAttributes(final AuthenticationBuilder builder, final Credential credential) { final String credentialsClass = credential.getClass().getName(); final String authenticationMethod = this.authenticationMethods.get(credentialsClass); builder.addAttribute(ATTRIBUTE_AUTHENTICATION_METHOD, authenticationMethod); }
@Override public void populateAttributes(final AuthenticationBuilder builder, final Credential credential) { final RememberMeCredential r = (RememberMeCredential) credential; if (r.isRememberMe()) { LOGGER.debug("Credential is configured to be remembered. Captured this as {} attribute", RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME); builder.addAttribute(RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME, Boolean.TRUE); } }
@Override public void populateAttributes(final AuthenticationBuilder builder, final Credential credential) { Set<String> successes = builder.getSuccesses().keySet(); if (successes != null) { successes = new HashSet(successes); } builder.addAttribute(SUCCESSFUL_AUTHENTICATION_HANDLERS, successes); }
@Override public void populateAttributes(final AuthenticationBuilder builder, final Credential credential) { logger.debug("Processing request to capture the credential for [{}]", credential.getId()); final UsernamePasswordCredential c = (UsernamePasswordCredential) credential; builder.addAttribute(UsernamePasswordCredential.AUTHENTICATION_ATTRIBUTE_PASSWORD, c.getPassword()); logger.debug("Encrypted credential is added as the authentication attribute [{}] to the authentication", UsernamePasswordCredential.AUTHENTICATION_ATTRIBUTE_PASSWORD); }
/** * Add authentication method attribute. * * @param builder the builder * @param authentication the authentication */ private void addAuthenticationMethodAttribute(final AuthenticationBuilder builder, final Authentication authentication) { for (final HandlerResult result : authentication.getSuccesses().values()) { builder.addAttribute(AUTHENTICATION_METHOD_ATTRIBUTE, result.getHandlerName()); } }
/** * {@InheritDoc} */ @Override public void populateAttributes(final AuthenticationBuilder builder, final Credential credential) { if (credential instanceof ClientCredential) { final ClientCredential clientCredential = (ClientCredential) credential; builder.addAttribute(CLIENT_NAME, clientCredential.getOpenIdCredentials().getClientName()); } }
@Override public void populateAttributes(final AuthenticationBuilder authenticationBuilder, final Credential credential) { final RequestContext context = RequestContextHolder.getRequestContext(); if (context != null) { final Service svc = WebUtils.getService(context); if (svc instanceof MultiFactorAuthenticationSupportingWebApplicationService) { final MultiFactorAuthenticationSupportingWebApplicationService mfaSvc = (MultiFactorAuthenticationSupportingWebApplicationService) svc; authenticationBuilder.addAttribute( MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD, mfaSvc.getAuthenticationMethod()); logger.debug("Captured authentication method [{}] into the authentication context", mfaSvc.getAuthenticationMethod()); } } }