public class BasicAuthClient extends BaseHttpClient
RequiresHttpAction
is returned which must be handled by the application to force
authentication.
The realm name can be defined using the setRealmName(String)
method.
It returns a HttpProfile
.HttpProfile
usernamePasswordAuthenticator
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, logger, NEEDS_CLIENT_REDIRECTION_PARAMETER
Constructor and Description |
---|
BasicAuthClient() |
BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator) |
BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator,
ProfileCreator profilePopulator) |
Modifier and Type | Method and Description |
---|---|
Mechanism |
getMechanism() |
String |
getRealmName() |
protected void |
internalInit() |
protected boolean |
isDirectRedirection() |
protected BaseClient<UsernamePasswordCredentials,HttpProfile> |
newClient() |
protected UsernamePasswordCredentials |
retrieveCredentials(WebContext context) |
protected RedirectAction |
retrieveRedirectAction(WebContext context) |
void |
setRealmName(String realmName) |
String |
toString() |
clone, getProfileCreator, getUsernamePasswordAuthenticator, retrieveUserProfile, setProfileCreator, setUsernamePasswordAuthenticator
addAuthorizationGenerator, getAuthorizationGenerators, getCallbackUrl, getContextualCallbackUrl, getCredentials, getName, getRedirectAction, getRedirectionUrl, getStateParameter, getUserProfile, isEnableContextualRedirects, prependHostToUrlIfNotPresent, redirect, setAuthorizationGenerator, setAuthorizationGenerators, setCallbackUrl, setEnableContextualRedirects, setName
init, reinit
public BasicAuthClient()
public BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator)
public BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator, ProfileCreator profilePopulator)
protected BaseClient<UsernamePasswordCredentials,HttpProfile> newClient()
newClient
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
protected void internalInit()
internalInit
in class BaseHttpClient
protected RedirectAction retrieveRedirectAction(WebContext context)
retrieveRedirectAction
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
protected UsernamePasswordCredentials retrieveCredentials(WebContext context) throws RequiresHttpAction
retrieveCredentials
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
RequiresHttpAction
public String getRealmName()
public void setRealmName(String realmName)
public String toString()
toString
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
protected boolean isDirectRedirection()
isDirectRedirection
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
public Mechanism getMechanism()
getMechanism
in class BaseClient<UsernamePasswordCredentials,HttpProfile>
Copyright © 2014. All Rights Reserved.