public class IndirectBasicAuthClient extends IndirectClientV2<UsernamePasswordCredentials,CommonProfile>
This class is the client to authenticate users through HTTP basic auth. It was previously named: BasicAuthClient.
For authentication, the user is redirected to the callback url. If the user is not authenticated by basic auth, a
specific exception : HttpAction is returned which must be handled by the application to force
authentication.
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolverlogger| Constructor and Description |
|---|
IndirectBasicAuthClient() |
IndirectBasicAuthClient(Authenticator usernamePasswordAuthenticator) |
IndirectBasicAuthClient(Authenticator usernamePasswordAuthenticator,
ProfileCreator profileCreator) |
IndirectBasicAuthClient(String realmName,
Authenticator usernamePasswordAuthenticator) |
| Modifier and Type | Method and Description |
|---|---|
String |
getRealmName() |
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
protected UsernamePasswordCredentials |
retrieveCredentials(WebContext context)
Retrieve the credentials.
|
void |
setRealmName(String realmName) |
String |
toString() |
getAuthenticator, getCredentialsExtractor, getProfileCreator, getRedirectActionBuilder, retrieveRedirectAction, retrieveUserProfile, setAuthenticator, setCredentialsExtractor, setProfileCreator, setRedirectActionBuildercomputeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getRedirectAction, getStateParameter, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrladdAuthorizationGenerator, addAuthorizationGenerators, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setNameinit, reinitpublic IndirectBasicAuthClient()
public IndirectBasicAuthClient(Authenticator usernamePasswordAuthenticator)
public IndirectBasicAuthClient(String realmName, Authenticator usernamePasswordAuthenticator)
public IndirectBasicAuthClient(Authenticator usernamePasswordAuthenticator, ProfileCreator profileCreator)
protected void internalInit(WebContext context)
InitializableWebObjectinternalInit in class IndirectClient<UsernamePasswordCredentials,CommonProfile>context - the web contextprotected UsernamePasswordCredentials retrieveCredentials(WebContext context) throws HttpAction
BaseClientretrieveCredentials in class IndirectClientV2<UsernamePasswordCredentials,CommonProfile>context - the web contextHttpAction - whether an additional HTTP action is requiredpublic String getRealmName()
public void setRealmName(String realmName)
public String toString()
toString in class IndirectClientV2<UsernamePasswordCredentials,CommonProfile>Copyright © 2016. All rights reserved.