Class DefaultActionTokenKey
- java.lang.Object
-
- org.keycloak.representations.JsonWebToken
-
- org.keycloak.authentication.actiontoken.DefaultActionTokenKey
-
- All Implemented Interfaces:
Serializable
,ActionTokenKeyModel
,Token
- Direct Known Subclasses:
DefaultActionToken
public class DefaultActionTokenKey extends JsonWebToken implements ActionTokenKeyModel
- Author:
- hmlnarik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACTION_TOKEN_USER_ID
The authenticationSession note with ID of the user authenticated via the action tokenstatic String
JSON_FIELD_ACTION_VERIFICATION_NONCE
-
Constructor Summary
Constructors Constructor Description DefaultActionTokenKey()
DefaultActionTokenKey(String userId, String actionId, int absoluteExpirationInSecs, UUID actionVerificationNonce)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultActionTokenKey
from(String serializedKey)
String
getActionId()
UUID
getActionVerificationNonce()
String
getUserId()
-
Methods inherited from class org.keycloak.representations.JsonWebToken
addAudience, audience, exp, expiration, getAudience, getCategory, getExp, getExpiration, getIat, getId, getIssuedAt, getIssuedFor, getIssuer, getNbf, getNotBefore, getOtherClaims, getSubject, getType, hasAnyAudience, hasAudience, iat, id, isActive, isActive, isExpired, isIssuedBeforeSessionStart, isNotBefore, issuedAt, issuedFor, issuedNow, issuer, nbf, notBefore, setOtherClaims, setSubject, subject, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ActionTokenKeyModel
getExpiration, serializeKey
-
-
-
-
Field Detail
-
ACTION_TOKEN_USER_ID
public static final String ACTION_TOKEN_USER_ID
The authenticationSession note with ID of the user authenticated via the action token- See Also:
- Constant Field Values
-
JSON_FIELD_ACTION_VERIFICATION_NONCE
public static final String JSON_FIELD_ACTION_VERIFICATION_NONCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserId
public String getUserId()
- Specified by:
getUserId
in interfaceActionTokenKeyModel
- Returns:
- ID of user which this token is for.
-
getActionId
public String getActionId()
- Specified by:
getActionId
in interfaceActionTokenKeyModel
- Returns:
- Action identifier this token is for.
-
getActionVerificationNonce
public UUID getActionVerificationNonce()
- Specified by:
getActionVerificationNonce
in interfaceActionTokenKeyModel
- Returns:
- Single-use random value used for verification whether the relevant action is allowed.
-
from
public static DefaultActionTokenKey from(String serializedKey)
-
-