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

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

public class ScopedNTAuthenticator
extends AbstractScopedAuthenticator<Pair<Tuple<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 NTLM authentication schemes.

See ScopedAuthenticator for an implementation that works for the Basic and Digest authentication schemes.


Constructor Summary
ScopedNTAuthenticator(Map<URI,Pair<Tuple<String>,char[]>> credentials)
          Creates an authenticator with a set of credentials for URIs
ScopedNTAuthenticator(URI target, String username, char[] password, String workstation, String domain)
          Creates an authenticator with credentials for the given URI
 
Method Summary
 void addCredentials(URI target, String username, char[] password, String workstation, String domain)
          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

ScopedNTAuthenticator

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

Parameters:
target - URI
username - User name
password - Password
workstation - Workstation, this is the ID of your local workstation
domain - Domain, this is the domain you are authenticating in which may not necessarily be the domain your workstation is in

ScopedNTAuthenticator

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

Parameters:
credentials - Credentials, the left of the pair should be a tuple with at least three fields where the first contains the user name, the second the workstation and the third the domain. The right of the pair should be the password.
Method Detail

addCredentials

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

Parameters:
target - Target
username - User name
password - Password
workstation - Workstation, this is the ID of your local workstation
domain - Domain, this is the domain you are authenticating in which may not necessarily be the domain your workstation is in


Licenced under the Apache License, Version 2.0