Issue #152 Simplify ticket lookup.
This commit is contained in:
parent
3f0a1c6883
commit
06b566e2d6
|
|
@ -159,7 +159,7 @@ public class CasAuthenticator extends AbstractLifeCycle implements Authenticator
|
|||
return authentication;
|
||||
}
|
||||
|
||||
final String ticket = extractTicket(request);
|
||||
final String ticket = request.getParameter(protocol.getArtifactParameterName());
|
||||
if (ticket != null && mandatory) {
|
||||
try {
|
||||
logger.debug("Attempting to validate {}", ticket);
|
||||
|
|
@ -245,15 +245,4 @@ public class CasAuthenticator extends AbstractLifeCycle implements Authenticator
|
|||
throw new ServerAuthException("Redirect to CAS failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
private String extractTicket(final HttpServletRequest request) {
|
||||
String ticket;
|
||||
for (final Protocol protocol : Protocol.values()) {
|
||||
ticket = request.getParameter(protocol.getArtifactParameterName());
|
||||
if (ticket != null) {
|
||||
return ticket;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue