final AuthenticationTransaction transaction = AuthenticationTransaction.wrap(credential); this.authenticationSystemSupport.getAuthenticationTransactionManager().handle(transaction, builder); final AuthenticationContext authenticationContext = builder.build();
@Override protected Event doExecute(final RequestContext context) throws Exception { final HttpServletRequest request = WebUtils.getHttpServletRequest(context); final String authTokenValue = request.getParameter(TokenConstants.PARAMETER_NAME_TOKEN); final Service service = WebUtils.getService(context); if (StringUtils.isNotBlank(authTokenValue) && service != null) { try { final Credential credential = new TokenCredential(authTokenValue, service); LOGGER.debug("Received token authentication request {} ", credential); final AuthenticationContextBuilder builder = new DefaultAuthenticationContextBuilder( this.authenticationSystemSupport.getPrincipalElectionStrategy()); final AuthenticationTransaction transaction = AuthenticationTransaction.wrap(credential); this.authenticationSystemSupport.getAuthenticationTransactionManager().handle(transaction, builder); final AuthenticationContext authenticationContext = builder.build(service); final TicketGrantingTicket tgt = this.centralAuthenticationService.createTicketGrantingTicket(authenticationContext); WebUtils.putTicketGrantingTicketInScopes(context, tgt); return success(); } catch (final Exception e) { LOGGER.warn(e.getMessage(), e); } } return error(); }
AuthenticationTransaction.wrap(credential); this.authenticationSystemSupport.getAuthenticationTransactionManager() .handle(transaction, builder); final AuthenticationContext authenticationContext = builder.build(service);
final AuthenticationTransaction transaction = AuthenticationTransaction.wrap(credential); this.authenticationSystemSupport.getAuthenticationTransactionManager().handle(transaction, builder); final AuthenticationContext authenticationContext = builder.build(service); final AuthenticationTransaction transaction = AuthenticationTransaction.wrap(credential); this.authenticationSystemSupport.getAuthenticationTransactionManager().handle(transaction, builder); final AuthenticationContext authenticationContext = builder.build(service);