org.apache.jena.atlas.web.auth
Class AbstractCredentialsAuthenticator

java.lang.Object
  extended by org.apache.jena.atlas.web.auth.AbstractCredentialsAuthenticator
All Implemented Interfaces:
HttpAuthenticator
Direct Known Subclasses:
AbstractScopedAuthenticator, SimpleAuthenticator

public abstract class AbstractCredentialsAuthenticator
extends Object
implements HttpAuthenticator

Abstract authenticator that uses user name and password credentials


Constructor Summary
AbstractCredentialsAuthenticator()
           
 
Method Summary
 void apply(org.apache.http.impl.client.AbstractHttpClient client, org.apache.http.protocol.HttpContext context, URI target)
          Applies any necessary authentication methods to the given HTTP Client
 void invalidate()
          Invalidates the authenticator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCredentialsAuthenticator

public AbstractCredentialsAuthenticator()
Method Detail

apply

public void apply(org.apache.http.impl.client.AbstractHttpClient client,
                  org.apache.http.protocol.HttpContext context,
                  URI target)
Description copied from interface: HttpAuthenticator
Applies any necessary authentication methods to the given HTTP Client

The target parameter indicates the URI to which the request is being made and so may be used by an authenticator to determine whether it actually needs to apply any authentication or to scope authentication appropriately.

Specified by:
apply in interface HttpAuthenticator
Parameters:
client - HTTP Client
context - HTTP Context
target - Target URI to which code wants to authenticate

invalidate

public void invalidate()
Description copied from interface: HttpAuthenticator
Invalidates the authenticator

Allows code to inform the authenticator that any cached authentication information should be invalidated. This can be useful after an authentication attempt fails or after a certain amount of time is passed. For many authenticators this may actually be a no-op since when using standard HTTP authentication typically you authenticate on every request and there are no cached authentication information. However more complex authentication mechanisms such as Form Based authentication may have cached information that discarding will force subsequent requests to re-authenticate.

Specified by:
invalidate in interface HttpAuthenticator


Licenced under the Apache License, Version 2.0