public class ScopedNTAuthenticator extends AbstractScopedAuthenticator<org.apache.jena.atlas.lib.Pair<org.apache.jena.atlas.lib.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 and Description |
---|
ScopedNTAuthenticator(Map<URI,org.apache.jena.atlas.lib.Pair<org.apache.jena.atlas.lib.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
|
Modifier and Type | Method and Description |
---|---|
void |
addCredentials(URI target,
String username,
char[] password,
String workstation,
String domain)
Adds/Overwrites credentials for a given URI
|
apply, invalidate
public ScopedNTAuthenticator(URI target, String username, char[] password, String workstation, String domain)
target
- URIusername
- User namepassword
- Passwordworkstation
- Workstation, this is the ID of your local workstationdomain
- Domain, this is the domain you are authenticating in which may
not necessarily be the domain your workstation is inpublic ScopedNTAuthenticator(Map<URI,org.apache.jena.atlas.lib.Pair<org.apache.jena.atlas.lib.Tuple<String>,char[]>> credentials)
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.public void addCredentials(URI target, String username, char[] password, String workstation, String domain)
target
- Targetusername
- User namepassword
- Passwordworkstation
- Workstation, this is the ID of your local workstationdomain
- Domain, this is the domain you are authenticating in which may
not necessarily be the domain your workstation is inLicenced under the Apache License, Version 2.0