Package com.enonic.xp.security.auth

## Class AuthenticationInfo

- java.lang.Object
- - com.enonic.xp.security.auth.AuthenticationInfo

- All Implemented Interfaces:
    `Serializable`

      @PublicApi
      public final class AuthenticationInfo
      extends Object
      implements Serializable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `AuthenticationInfo.Builder` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static AuthenticationInfo.Builder` | `copyOf​(AuthenticationInfo authInfo)` |
    `static AuthenticationInfo.Builder` | `create()` |
    `boolean` | `equals​(Object o)` |
    `PrincipalKeys` | `getPrincipals()` |
    `User` | `getUser()` |
    `int` | `hashCode()` |
    `boolean` | `hasRole​(PrincipalKey role)` |
    `boolean` | `hasRole​(String role)` |
    `boolean` | `isAuthenticated()` |
    `static AuthenticationInfo` | `unAuthenticated()` |

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

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

- - ### Method Detail

    - #### isAuthenticated

          public boolean isAuthenticated()

    - #### getUser

          public User getUser()

    - #### getPrincipals

          public PrincipalKeys getPrincipals()

    - #### hasRole

          public boolean hasRole​(String role)

    - #### hasRole

          public boolean hasRole​(PrincipalKey role)

    - #### create

          public static AuthenticationInfo.Builder create()

    - #### copyOf

          public static AuthenticationInfo.Builder copyOf​(AuthenticationInfo authInfo)

    - #### unAuthenticated

          public static AuthenticationInfo unAuthenticated()

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`