Class DefaultActionToken

    • Constructor Detail

      • DefaultActionToken

        public DefaultActionToken()
        Single-use random value used for verification whether the relevant action is allowed.
      • DefaultActionToken

        protected DefaultActionToken​(String userId,
                                     String actionId,
                                     int absoluteExpirationInSecs,
                                     UUID actionVerificationNonce)
        Parameters:
        userId - User ID
        actionId - Action ID
        absoluteExpirationInSecs - Absolute expiration time in seconds in timezone of Keycloak.
        actionVerificationNonce -
      • DefaultActionToken

        protected DefaultActionToken​(String userId,
                                     String actionId,
                                     int absoluteExpirationInSecs,
                                     UUID actionVerificationNonce,
                                     String compoundAuthenticationSessionId)
        Parameters:
        userId - User ID
        actionId - Action ID
        absoluteExpirationInSecs - Absolute expiration time in seconds in timezone of Keycloak.
        actionVerificationNonce -
    • Method Detail

      • getCompoundAuthenticationSessionId

        public String getCompoundAuthenticationSessionId()
      • setCompoundAuthenticationSessionId

        public final void setCompoundAuthenticationSessionId​(String authenticationSessionId)
      • setNote

        public final String setNote​(String name,
                                    String value)
        Sets value of the given note
        Returns:
        original value (or null when no value was present)
      • removeNote

        public final String removeNote​(String name)
        Removes given note, and returns original value (or null when no value was present)
        Returns:
        see description
      • setEmail

        public void setEmail​(String email)
      • getEmail

        public String getEmail()
      • serialize

        public String serialize​(KeycloakSession session,
                                RealmModel realm,
                                javax.ws.rs.core.UriInfo uri)
        Updates the following fields and serializes this token into a signed JWT. The list of updated fields follows:
        • id: random nonce
        • issuedAt: Current time
        • issuer: URI of the given realm
        • audience: URI of the given realm (same as issuer)
        Parameters:
        session -
        realm -
        uri -
        Returns: