org.keycloak

## Class KeycloakPrincipal

- java.lang.Object
- - org.keycloak.KeycloakPrincipal

- All Implemented Interfaces:
    Serializable, Principal

      public class KeycloakPrincipal
      extends Object
      implements Principal, Serializable

  Version:
    $Revision: 1 $
  Author:
    Bill Burke
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected KeycloakSecurityContext` | `context`
    `protected String` | `name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeycloakPrincipal(String name, KeycloakSecurityContext context)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `KeycloakSecurityContext` | `getKeycloakSecurityContext()`
    `String` | `getName()`
    `int` | `hashCode()`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### name

          protected final String name

    - #### context

          protected final KeycloakSecurityContext context

  - ### Constructor Detail

    - #### KeycloakPrincipal

          public KeycloakPrincipal(String name,
                           KeycloakSecurityContext context)

  - ### Method Detail

    - #### getKeycloakSecurityContext

          public KeycloakSecurityContext getKeycloakSecurityContext()

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `Principal`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in interface `Principal`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Principal`
      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Specified by:
        `toString` in interface `Principal`
      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.