Skip to content

Commit d64874b

Browse files
committed
Add explanatory comment
1 parent 8f99358 commit d64874b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

java/org/apache/catalina/authenticator/AuthenticatorBase.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,23 @@ private GenericPrincipal getPrincipal(Subject subject) {
887887
protected boolean checkForCachedAuthentication(Request request, HttpServletResponse response,
888888
boolean useSsoCachedUserAndPassword) {
889889

890+
/*
891+
* There are two methods for authentication caching implemented by the SSO Valve. The first caches the
892+
* authenticated Principal returned by the Realm. The second caches the user name and password passed to the
893+
* Realm that were used for authentication.
894+
*
895+
* If cached authentication is not available or fails for any reason, the Authenticator will attempt the normal
896+
* authentication process for the Authenticator.
897+
*
898+
* Which cached authentication methods are used depends on the configuration of the SSO Valve and/or the
899+
* Authenticator.
900+
*
901+
* If the SSO Valve is configured to require re-authentication, any cached Principal will not be used.
902+
*
903+
* If the SSO Valve is configured to require re-authentication, whether the cached user name and password can be
904+
* used will be determined by the calling Authenticator type.
905+
*/
906+
890907
// Has the user already been authenticated?
891908
Principal principal = request.getUserPrincipal();
892909
String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);

0 commit comments

Comments
 (0)