public static class HttpAuthenticationMethodType.HttpAuthenticationMethod extends AuthenticationMethod
AuthenticationMethodType
where the Users are authenticated
through HTTP Authentication.AuthenticationMethod.AuthCheckingStrategy, AuthenticationMethod.AuthPollFrequencyUnits, AuthenticationMethod.UnsupportedAuthenticationCredentialsException
Modifier and Type | Field and Description |
---|---|
protected String |
hostname |
protected int |
port |
protected String |
realm |
AUTH_STATE_ASSUMED_IN_STATS, AUTH_STATE_LOGGED_IN_STATS, AUTH_STATE_LOGGED_OUT_STATS, AUTH_STATE_NO_INDICATOR_STATS, AUTH_STATE_UNKNOWN_STATS, CONTEXT_CONFIG_AUTH, CONTEXT_CONFIG_AUTH_LOGGEDIN, CONTEXT_CONFIG_AUTH_LOGGEDOUT, CONTEXT_CONFIG_AUTH_POLL_DATA, CONTEXT_CONFIG_AUTH_POLL_FREQ, CONTEXT_CONFIG_AUTH_POLL_HEADERS, CONTEXT_CONFIG_AUTH_POLL_UNITS, CONTEXT_CONFIG_AUTH_POLL_URL, CONTEXT_CONFIG_AUTH_STRATEGY, CONTEXT_CONFIG_AUTH_TYPE, DEFAULT_POLL_FREQUENCY, loggedInIndicatorPattern, loggedOutIndicatorPattern, TOKEN_POSTFIX, TOKEN_PREFIX
Constructor and Description |
---|
HttpAuthenticationMethod() |
Modifier and Type | Method and Description |
---|---|
WebSession |
authenticate(SessionManagementMethod sessionManagementMethod,
AuthenticationCredentials credentials,
User user)
Performs an authentication in a web application, returning an authenticated.
|
AuthenticationCredentials |
createAuthenticationCredentials()
Creates a new, empty, Authentication Credentials object corresponding to this type of
Authentication method.
|
protected AuthenticationMethod |
duplicate()
Internal method for cloning the current authentication method, creating a deep-copy of it.
|
ApiResponse |
getApiResponseRepresentation()
Gets an api response that represents the Authentication Method.
|
AuthenticationMethodType |
getType()
Gets the
AuthenticationMethodType corresponding to this authentication method. |
boolean |
isConfigured()
Checks if the authentication method is fully configured.
|
void |
replaceUserDataInPollRequest(HttpMessage msg,
User user) |
void |
setHostname(String hostname) |
void |
setPort(int port) |
void |
setRealm(String realm) |
clone, equals, evaluateAuthRequest, getAuthCheckingStrategy, getLoggedInIndicatorPattern, getLoggedOutIndicatorPattern, getPollData, getPollFrequency, getPollFrequencyUnits, getPollHeaders, getPollUrl, hashCode, isAuthenticated, isAuthenticated, isAuthenticated, isSameType, onMethodDiscarded, onMethodPersisted, pollAsUser, setAuthCheckingStrategy, setLoggedInIndicatorPattern, setLoggedOutIndicatorPattern, setPollData, setPollFrequency, setPollFrequencyUnits, setPollHeaders, setPollUrl, validateCreationOfAuthenticationCredentials
protected String hostname
protected int port
protected String realm
public void setHostname(String hostname)
public void setPort(int port)
public void setRealm(String realm)
public boolean isConfigured()
AuthenticationMethod
isConfigured
in class AuthenticationMethod
protected AuthenticationMethod duplicate()
AuthenticationMethod
duplicate
in class AuthenticationMethod
public AuthenticationCredentials createAuthenticationCredentials()
AuthenticationMethod
createAuthenticationCredentials
in class AuthenticationMethod
AuthenticationMethod.validateCreationOfAuthenticationCredentials()
public AuthenticationMethodType getType()
AuthenticationMethod
AuthenticationMethodType
corresponding to this authentication method.
Implementations may return new instantiations at every call, so performance considerations should be taken by users.
getType
in class AuthenticationMethod
public WebSession authenticate(SessionManagementMethod sessionManagementMethod, AuthenticationCredentials credentials, User user) throws AuthenticationMethod.UnsupportedAuthenticationCredentialsException
AuthenticationMethod
authenticate
in class AuthenticationMethod
sessionManagementMethod
- the set up session management method is provided so it can be
used, if needed, to automatically extract session information from Http Messages.credentials
- the credentialsuser
- the user to authenticateAuthenticationMethod.UnsupportedAuthenticationCredentialsException
- the unsupported authentication
credentials exception WebSession
.public ApiResponse getApiResponseRepresentation()
AuthenticationMethod
getApiResponseRepresentation
in class AuthenticationMethod
public void replaceUserDataInPollRequest(HttpMessage msg, User user)
replaceUserDataInPollRequest
in class AuthenticationMethod