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
ProtocolExceptionpublic void setHttpClient(RIDCHttpClient httpClient)
public RIDCHttpMethod getPingMethod()
public void setPingMethod(RIDCHttpMethod pingMethod)
public boolean isAuthSupported(RIDCHttpClient httpClient, RIDCHttpMethod httpMethod) throws ProtocolException
isAuthSupported in interface AuthenticationHandlerhttpClient - the http client that was used to invoke the pinghttpMethod - the http method that was used to invoke the pingProtocolExceptionpublic IdcContext.HttpAuthScheme getAuthScheme()
getAuthScheme in interface AuthenticationHandler
public int sendAuthenticatedRequest()
throws ProtocolException
sendAuthenticatedRequest in interface AuthenticationHandlerProtocolException
protected void handleFormLogin()
throws ProtocolException
ProtocolExceptionprotected RIDCHttpClient createHttpClient() throws ProtocolException
ProtocolExceptionprotected int executeLogin(RIDCHttpPostMethod postMethod) throws ProtocolException
postMethod - the post methodProtocolExceptionprotected RIDCHttpPostMethod createLoginMethod() throws ProtocolException
ProtocolExceptionprotected String getLoginFormPath(IdcContext.LoginForm loginForm) throws ProtocolException
loginForm - the login formProtocolExceptionprotected IdcContext.LoginForm getLoginForm()
protected void handleFormResponse(RIDCHttpMethod postMethod, int status) throws ProtocolException
postMethod - the post methodstatus - the status of the postProtocolExceptionprotected void throwFormValidateException(RIDCHttpMethod postMethod) throws ProtocolException
postMethod - the post methodProtocolException