/** * Track trusted multifactor authentication attribute. * * @param authn the authn * @param attributeName the attribute name */ public static void trackTrustedMultifactorAuthenticationAttribute( final Authentication authn, final String attributeName) { val newAuthn = DefaultAuthenticationBuilder.newInstance(authn) .addAttribute(attributeName, Boolean.TRUE) .build(); LOGGER.debug("Updated authentication session to remember trusted multifactor record via [{}]", attributeName); authn.update(newAuthn); }
@Override public void updateAuthentication(final String ticketGrantingTicketId, final Authentication authentication) { val tgt = this.ticketRegistry.getTicket(ticketGrantingTicketId, TicketGrantingTicket.class); tgt.getAuthentication().update(authentication); this.ticketRegistry.updateTicket(tgt); } }