public class TokenChallenge extends Challenge
Modifier and Type | Field and Description |
---|---|
protected static String |
KEY_KEY_AUTHORIZATION |
protected static String |
KEY_TOKEN |
KEY_ERROR, KEY_STATUS, KEY_TYPE, KEY_URI, KEY_VALIDATED
Constructor and Description |
---|
TokenChallenge(Session session)
Creates a new generic
TokenChallenge object. |
Modifier and Type | Method and Description |
---|---|
protected void |
authorize()
Callback that is invoked when the challenge is supposed to compute its
authorization data.
|
protected String |
computeAuthorization()
Computes the authorization string.
|
protected String |
getAuthorization()
Gets the authorization.
|
protected String |
getToken()
Gets the token.
|
protected void |
respond(JSONBuilder cb)
Exports the response state, as preparation for triggering the challenge.
|
acceptable, bind, getError, getJSON, getLocation, getStatus, getType, getValidated, trigger, unmarshall, update
getSession, rebind, setLocation, setSession
protected static final String KEY_TOKEN
protected static final String KEY_KEY_AUTHORIZATION
public TokenChallenge(Session session)
TokenChallenge
object.session
- Session
to bind to.protected void respond(JSONBuilder cb)
Challenge
respond
in class Challenge
cb
- JSONBuilder
to copy the response toprotected String getAuthorization()
protected String computeAuthorization()
The default is token + '.' + base64url(jwkThumbprint)
. Subclasses may
override this method if a different algorithm is used.
Copyright © 2015–2019. All rights reserved.