public abstract class GenericAuthentificationHandler extends Object implements IEventListener, Extension
The following events are mapped on init :
EventManager.EVENT_PROXY_PRE
is mapped to beforeProxy(HttpRequest)
EventManager.EVENT_FRAGMENT_PRE
is mapped to preRequest(OutgoingRequest, IncomingRequest)
EventManager.EVENT_FRAGMENT_POST
is mapped to
needsNewRequest(HttpResponse, OutgoingRequest, IncomingRequest)
To update an old AuthentificationHandler :
Constructor and Description |
---|
GenericAuthentificationHandler() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
beforeProxy(org.apache.http.HttpRequest httpRequest)
Method called before proxying a request
This method can ask the users credentials by sending an authentication page or a 401 code or redirect to a login
page.
|
boolean |
event(EventDefinition id,
Event event)
Handle an event.
|
Driver |
getDriver() |
void |
init(Driver d,
Properties properties)
Initialize the extension using the given properties.
|
abstract void |
init(Properties properties) |
abstract boolean |
needsNewRequest(org.apache.http.HttpResponse response,
OutgoingRequest outgoingRequest,
IncomingRequest incomingRequest)
Method called after the response has been obtained from the destination server.
|
abstract void |
preRequest(OutgoingRequest outgoingRequest,
IncomingRequest incomingRequest)
Method called before sending a request to the destination server.
|
public abstract boolean beforeProxy(org.apache.http.HttpRequest httpRequest)
httpRequest
- the incoming requestpublic abstract void preRequest(OutgoingRequest outgoingRequest, IncomingRequest incomingRequest)
outgoingRequest
- incomingRequest
- public abstract boolean needsNewRequest(org.apache.http.HttpResponse response, OutgoingRequest outgoingRequest, IncomingRequest incomingRequest)
response
- outgoingRequest
- incomingRequest
- public final void init(Driver d, Properties properties)
Extension
Extensions may register to events during the init phase.
public abstract void init(Properties properties)
public boolean event(EventDefinition id, Event event)
IEventListener
event
in interface IEventListener
public Driver getDriver()
Copyright © 2008–2018. All rights reserved.