Skip to content

Commit

Permalink
allow better control over WS-FED principal resolver
Browse files Browse the repository at this point in the history
# Conflicts:
#	cas-server-core-authentication/src/main/java/org/jasig/cas/authentication/principal/PersonDirectoryPrincipalResolver.java
#	cas-server-support-wsfederation/src/main/java/org/jasig/cas/support/wsfederation/web/flow/WsFederationAction.java
  • Loading branch information
SavvasMisaghMoayyed committed Jan 28, 2016
1 parent 51dd4b9 commit 6285ff6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ protected Event doExecute(final RequestContext context) throws Exception {
restoreRequestAttribute(request, session, LOCALE);
restoreRequestAttribute(request, session, METHOD);

final AuthenticationResult authenticationResult =
this.authenticationSystemSupport.handleAndFinalizeSingleAuthenticationTransaction(service, 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);

WebUtils.putTicketGrantingTicketInScopes(context,
this.centralAuthenticationService.createTicketGrantingTicket(authenticationResult));
this.centralAuthenticationService.createTicketGrantingTicket(authenticationContext));

logger.info("Token validated and new {} created: {}", credential.getClass().getName(), credential);
return success();
Expand Down

0 comments on commit 6285ff6

Please sign in to comment.