public abstract class DirectHttpClient<C extends Credentials> extends DirectClient<C,CommonProfile>
This class is the base HTTP client to authenticate directly users through HTTP protocol.
All the logic is based on Extractor, Authenticator and ProfileCreator.
It returns a HttpProfile.
HttpProfile| Modifier and Type | Field and Description |
|---|---|
protected Extractor<C> |
extractor |
logger| Constructor and Description |
|---|
DirectHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
DirectHttpClient<C> |
clone()
Clone the current client.
|
Authenticator<C> |
getAuthenticator() |
C |
getCredentials(WebContext context)
Get the credentials from the web context.
|
ProfileCreator<C,CommonProfile> |
getProfileCreator() |
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
protected CommonProfile |
retrieveUserProfile(C credentials,
WebContext context) |
void |
setAuthenticator(Authenticator<C> authenticator) |
void |
setProfileCreator(ProfileCreator<C,CommonProfile> profileCreator) |
String |
toString() |
redirectaddAuthorizationGenerator, getAuthorizationGenerators, getClientType, getName, getUserProfile, newClient, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setNameinit, reinitprotected Extractor<C extends Credentials> extractor
protected void internalInit(WebContext context)
InitializableWebObjectinternalInit in class InitializableWebObjectcontext - the web contextpublic DirectHttpClient<C> clone()
BaseClientclone in class BaseClient<C extends Credentials,CommonProfile>public C getCredentials(WebContext context) throws RequiresHttpAction
ClientGet the credentials from the web context. If no validation was made remotely (direct client), credentials must be validated at this step.
In some cases, a RequiresHttpAction may be thrown instead.
context - the current web contextRequiresHttpAction - whether an additional HTTP action is requiredprotected CommonProfile retrieveUserProfile(C credentials, WebContext context)
retrieveUserProfile in class BaseClient<C extends Credentials,CommonProfile>public String toString()
toString in class BaseClient<C extends Credentials,CommonProfile>public Authenticator<C> getAuthenticator()
public void setAuthenticator(Authenticator<C> authenticator)
public ProfileCreator<C,CommonProfile> getProfileCreator()
public void setProfileCreator(ProfileCreator<C,CommonProfile> profileCreator)
Copyright © 2016. All rights reserved.