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
callbackUrl, logger, NEEDS_CLIENT_REDIRECTION_PARAMETER
Constructor and Description |
---|
BasicAuthClient() |
BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator) |
BasicAuthClient(UsernamePasswordAuthenticator usernamePasswordAuthenticator,
ProfileCreator profilePopulator) |
Modifier and Type | Method and Description |
---|---|
String |
getRealmName() |
protected void |
internalInit() |
protected boolean |
isDirectRedirection() |
protected BaseClient<UsernamePasswordCredentials,HttpProfile> |
newClient() |
protected UsernamePasswordCredentials |
retrieveCredentials(WebContext context) |
protected String |
retrieveRedirectionUrl(WebContext context) |
void |
setRealmName(String realmName) |
String |
toString() |
clone, getProfileCreator, getProtocol, getUsernamePasswordAuthenticator, retrieveUserProfile, setProfileCreator, setUsernamePasswordAuthenticator
getCallbackUrl, getCredentials, getName, getRedirectionUrl, getRedirectionUrl, getUserProfile, setCallbackUrl, 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 String retrieveRedirectionUrl(WebContext context)
retrieveRedirectionUrl
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>
Copyright © 2013. All Rights Reserved.