public final class HttpBasedServiceCredentialsAuthenticationHandler extends AbstractAuthenticationHandler
This class is concerned with ensuring that the protocol is HTTPS and that a response is returned. The SSL handshake that occurs automatically by opening a connection does the heavy process of authenticating.
| Constructor and Description |
|---|
HttpBasedServiceCredentialsAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
HandlerResult |
authenticate(Credential credential)
Authenticates the given credential.
|
void |
setHttpClient(HttpClient httpClient)
Sets the HttpClient which will do all of the connection stuff.
|
void |
setRequireSecure(boolean requireSecure)
Set whether a secure url is required or not.
|
boolean |
supports(Credential credential)
Determines whether the handler has the capability to authenticate the given credential.
|
getName, setNamepublic HttpBasedServiceCredentialsAuthenticationHandler()
public HandlerResult authenticate(Credential credential) throws GeneralSecurityException
AuthenticationHandlerHandlerResultGeneralSecurityExceptionPreventedExceptioncredential - The credential to authenticate.PrincipalGeneralSecurityException - On authentication failures where the root cause is security related,
e.g. invalid credential. Implementing classes SHOULD be as specific as possible in communicating the reason for
authentication failure. Recommendations for common cases:
FailedLoginExceptionCredentialExpiredExceptionAccountExpiredExceptionAccountLockedExceptionAccountNotFoundExceptionInvalidLoginTimeExceptionInvalidLoginLocationExceptionCertificateExpiredExceptionpublic boolean supports(Credential credential)
AuthenticationHandlerAuthenticationHandler.authenticate(Credential) method MUST be capable of processing a given credential if
supports returns true on the same credential.credential - The credential to check.public void setHttpClient(HttpClient httpClient)
httpClient - http client instance to usepublic void setRequireSecure(boolean requireSecure)
requireSecure - true if its required, false if not. Default is true.Copyright © 2004-2014 Jasig. All Rights Reserved.