public interface AuthScheme
Note that instances of this class may or may not map exactly to an Authentication Scheme as defined in RFC7235; a given instance may only be able to respond to a subset of challenges with a given scheme name.
Modifier and Type | Method and Description |
---|---|
ContextFactory |
createContextFactory(Challenge challenge,
java.net.URL url)
Attempts to return an object that can take user input to generate
an AuthContext based on a given challenge.
|
java.lang.String |
getName()
Returns a human-readable name identifying the authentication
scheme implemented by this object.
|
java.lang.String getName()
auth-scheme
token from an RFC7235 challenge (for instance "Basic" for Basic
authentication), but a different value may be used if required
to distinguish it from other instances.ContextFactory createContextFactory(Challenge challenge, java.net.URL url) throws BadChallengeException
Note that this method should just examine the syntax of the supplied challenge; it is not expected to make network connections etc to determine if context creation will be successful.
challenge
- authentication challenge objecturl
- URL with which the challenge is associatedBadChallengeException
- if the challenge scheme etc
indicates that it is destined for this AuthScheme,
but the challenge is not of the correct form