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

java.lang.Object
  extended by org.apache.jena.atlas.web.auth.AbstractCredentialsAuthenticator
      extended by org.apache.jena.atlas.web.auth.AbstractScopedAuthenticator<Pair<String,char[]>>
          extended by org.apache.jena.atlas.web.auth.ScopedAuthenticator
All Implemented Interfaces:
HttpAuthenticator

public class ScopedAuthenticator
extends AbstractScopedAuthenticator<Pair<String,char[]>>

A credentials based authenticator where credentials are scoped to URIs. This allows for a single authenticator to present different credentials to different URIs as appropriate. Works with the basic and digest HTTP authentication schemes.

See ScopedNTAuthenticator for an implementation that works for the NTLM authentication scheme.


Constructor Summary
ScopedAuthenticator(Map<URI,Pair<String,char[]>> credentials)
          Creates an authenticator with a set of credentials for URIs
ScopedAuthenticator(URI target, String username, char[] password)
          Creates an authenticator with credentials for the given URI
 
Method Summary
 void addCredentials(URI target, String username, char[] password)
          Adds/Overwrites credentials for a given URI
 
Methods inherited from class org.apache.jena.atlas.web.auth.AbstractCredentialsAuthenticator
apply, invalidate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopedAuthenticator

public ScopedAuthenticator(URI target,
                           String username,
                           char[] password)
Creates an authenticator with credentials for the given URI

Parameters:
target - URI
username - User name
password - Password

ScopedAuthenticator

public ScopedAuthenticator(Map<URI,Pair<String,char[]>> credentials)
Creates an authenticator with a set of credentials for URIs

Parameters:
credentials - Credentials
Method Detail

addCredentials

public void addCredentials(URI target,
                           String username,
                           char[] password)
Adds/Overwrites credentials for a given URI

Parameters:
target - Target
username - User name
password - Password


Licenced under the Apache License, Version 2.0