org.keycloak.services.resources

## Class LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken

- java.lang.Object
- - org.keycloak.services.resources.LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken

- All Implemented Interfaces:
    TokenVerifier.Predicate<JsonWebToken>
  Enclosing class:
    LoginActionsServiceChecks

      public static class LoginActionsServiceChecks.AuthenticationSessionUserIdMatchesOneFromToken
      extends Object
      implements TokenVerifier.Predicate<JsonWebToken>

  This check verifies that user ID (subject) from the token matches the one from the authentication session.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticationSessionUserIdMatchesOneFromToken(ActionTokenContext<?> context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `test(JsonWebToken t)` Performs a single check on the given token verifier.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AuthenticationSessionUserIdMatchesOneFromToken

          public AuthenticationSessionUserIdMatchesOneFromToken(ActionTokenContext<?> context)

  - ### Method Detail

    - #### test

          public boolean test(JsonWebToken t)
                       throws VerificationException

      Description copied from interface: `TokenVerifier.Predicate`
      Performs a single check on the given token verifier.
      Specified by:
        `test` in interface `TokenVerifier.Predicate<JsonWebToken>`
      Parameters:
        `t` - Token, guaranteed to be non-null.
      Returns:
      Throws:
        `VerificationException`

Copyright © 2021 JBoss by Red Hat. All rights reserved.