org.keycloak

## Class KeycloakSecurityContext

- java.lang.Object
- - org.keycloak.KeycloakSecurityContext

- All Implemented Interfaces:
    Serializable

      public class KeycloakSecurityContext
      extends Object
      implements Serializable

  Available in secured requests under HttpServletRequest.getAttribute() Also available in HttpSession.getAttribute under the classname of this class
  Version:
    $Revision: 1 $
  Author:
    Bill Burke
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AuthorizationContext` | `authorizationContext`
    `protected IDToken` | `idToken`
    `protected String` | `idTokenString`
    `protected AccessToken` | `token`
    `protected String` | `tokenString`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeycloakSecurityContext()`
    `KeycloakSecurityContext(String tokenString, AccessToken token, String idTokenString, IDToken idToken)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuthorizationContext` | `getAuthorizationContext()`
    `IDToken` | `getIdToken()`
    `String` | `getIdTokenString()`
    `String` | `getRealm()`
    `AccessToken` | `getToken()`
    `String` | `getTokenString()`

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

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

- - ### Field Detail

    - #### tokenString

          protected String tokenString

    - #### idTokenString

          protected String idTokenString

    - #### token

          protected transient AccessToken token

    - #### idToken

          protected transient IDToken idToken

    - #### authorizationContext

          protected transient AuthorizationContext authorizationContext

  - ### Constructor Detail

    - #### KeycloakSecurityContext

          public KeycloakSecurityContext()

    - #### KeycloakSecurityContext

          public KeycloakSecurityContext(String tokenString,
                                         AccessToken token,
                                         String idTokenString,
                                         IDToken idToken)

  - ### Method Detail

    - #### getToken

          public AccessToken getToken()

    - #### getTokenString

          public String getTokenString()

    - #### getAuthorizationContext

          public AuthorizationContext getAuthorizationContext()

    - #### getIdToken

          public IDToken getIdToken()

    - #### getIdTokenString

          public String getIdTokenString()

    - #### getRealm

          public String getRealm()

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