Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
add more log statements to troubleshoot context class refs
Browse files Browse the repository at this point in the history
  • Loading branch information
SavvasMisaghMoayyed committed Jul 25, 2018
1 parent b7c6fa0 commit aac480d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ private void overrideAuthnContextClass(final String clazz, final HttpServletRequ
throw new IllegalArgumentException("No authentication method parameter is found in the request attributes");
}
final RequestedPrincipalContext principalCtx = authnContext.getSubcontext(RequestedPrincipalContext.class, true);

logger.debug("Overriding the principal authn context class ref to {}", clazz);
if (principalCtx != null) {
final List<Principal> principals = new ArrayList<>();
final Principal principal = new AuthnContextClassRefPrincipal(clazz);
principals.add(principal);
logger.debug("Overriding the principal authn context class ref to {}", principals);
principalCtx.setRequestedPrincipals(principals);
logger.error("The final requested authn context class ref principals are {}", principals);
} else {
logger.error("No requested principal context class is available");
}

}
}

0 comments on commit aac480d

Please sign in to comment.