public class FormAuthHandler extends Object implements AuthenticationHandler
Constructor and Description |
---|
FormAuthHandler(IdcHttpProtocol httpProtocol) |
Modifier and Type | Method and Description |
---|---|
protected RIDCHttpClient |
createHttpClient() |
protected RIDCHttpPostMethod |
createLoginMethod()
Create the post method for the login operation
|
protected int |
executeLogin(RIDCHttpPostMethod postMethod)
Execute the login method
|
IdcContext.HttpAuthScheme |
getAuthScheme() |
RIDCHttpClient |
getHttpClient() |
IdcHttpProtocol |
getHttpProtocol() |
protected IdcContext.LoginForm |
getLoginForm()
Retrieve the login form for this context
|
protected String |
getLoginFormPath(IdcContext.LoginForm loginForm)
Determine the location for the login form post
|
RIDCHttpMethod |
getPingMethod() |
protected void |
handleFormLogin()
Handle logging into the Content Server via a login form
|
protected void |
handleFormResponse(RIDCHttpMethod postMethod,
int status)
Handle processing the response from the form login
|
boolean |
isAuthSupported(RIDCHttpClient httpClient,
RIDCHttpMethod httpMethod)
Determine if the current handler can handle the given response to the auth scheme
|
int |
sendAuthenticatedRequest()
Send the authenticated request to the Content Server
|
void |
setHttpClient(RIDCHttpClient httpClient) |
void |
setPingMethod(RIDCHttpMethod pingMethod) |
protected void |
throwFormValidateException(RIDCHttpMethod postMethod)
Throw the form validation exception
|
public FormAuthHandler(IdcHttpProtocol httpProtocol)
public IdcHttpProtocol getHttpProtocol()
public RIDCHttpClient getHttpClient() throws ProtocolException
ProtocolException
public void setHttpClient(RIDCHttpClient httpClient)
public RIDCHttpMethod getPingMethod()
public void setPingMethod(RIDCHttpMethod pingMethod)
public boolean isAuthSupported(RIDCHttpClient httpClient, RIDCHttpMethod httpMethod) throws ProtocolException
isAuthSupported
in interface AuthenticationHandler
httpClient
- the http client that was used to invoke the pinghttpMethod
- the http method that was used to invoke the pingProtocolException
public IdcContext.HttpAuthScheme getAuthScheme()
getAuthScheme
in interface AuthenticationHandler
public int sendAuthenticatedRequest() throws ProtocolException
sendAuthenticatedRequest
in interface AuthenticationHandler
ProtocolException
protected void handleFormLogin() throws ProtocolException
ProtocolException
protected RIDCHttpClient createHttpClient() throws ProtocolException
ProtocolException
protected int executeLogin(RIDCHttpPostMethod postMethod) throws ProtocolException
postMethod
- the post methodProtocolException
protected RIDCHttpPostMethod createLoginMethod() throws ProtocolException
ProtocolException
protected String getLoginFormPath(IdcContext.LoginForm loginForm) throws ProtocolException
loginForm
- the login formProtocolException
protected IdcContext.LoginForm getLoginForm()
protected void handleFormResponse(RIDCHttpMethod postMethod, int status) throws ProtocolException
postMethod
- the post methodstatus
- the status of the postProtocolException
protected void throwFormValidateException(RIDCHttpMethod postMethod) throws ProtocolException
postMethod
- the post methodProtocolException