public class CadcAuthScheme extends Object implements AuthScheme
This scheme looks for a challenge like:
www-authenticate: ivoa_bearer standard_id="ivo://ivoa.net/sso#tls-with-password", access_url="https://ws-cadc.canfar.net/ac/login"and the text/plain content of the resource at the given
access_url
, when authenticated username
and
password
parameters are supplied, is a Bearer token that
can be used in accordance with RFC6750:
Authorization: Bearer <token-text>
Modifier and Type | Field and Description |
---|---|
static CadcAuthScheme |
INSTANCE
Singleton instance.
|
Modifier and Type | Method and Description |
---|---|
ContextFactory |
createContextFactory(Challenge challenge,
URL url)
Attempts to return an object that can take user input to generate
an AuthContext based on a given challenge.
|
String |
getName()
Returns a human-readable name identifying the authentication
scheme implemented by this object.
|
public static final CadcAuthScheme INSTANCE
public String getName()
AuthScheme
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.getName
in interface AuthScheme
public ContextFactory createContextFactory(Challenge challenge, URL url) throws BadChallengeException
AuthScheme
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.
createContextFactory
in interface AuthScheme
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