com.holonplatform.spring.security.internal

## Class SpringSecurityAuthenticationAdapter

- java.lang.Object
- - com.holonplatform.spring.security.internal.SpringSecurityAuthenticationAdapter

- All Implemented Interfaces:
    Serializable, Principal, org.springframework.security.core.Authentication

      public class SpringSecurityAuthenticationAdapter
      extends Object
      implements org.springframework.security.core.Authentication

  Adapter to represent an `Authentication` as a Spring Security authentication.
  Since:
    5.1.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpringSecurityAuthenticationAdapter(Authentication authentication)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<? extends org.springframework.security.core.GrantedAuthority>` | `getAuthorities()`
    `Object` | `getCredentials()`
    `Object` | `getDetails()`
    `String` | `getName()`
    `Object` | `getPrincipal()`
    `boolean` | `isAuthenticated()`
    `void` | `setAuthenticated(boolean isAuthenticated)`
    `String` | `toString()`

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.security.Principal

      `equals, hashCode, implies`

- - ### Constructor Detail

    - #### SpringSecurityAuthenticationAdapter

          public SpringSecurityAuthenticationAdapter(Authentication authentication)

      Constructor.
      Parameters:
        `authentication` - The concrete `Authentication` (not null)

  - ### Method Detail

    - #### getPrincipal

          public Object getPrincipal()

      Specified by:
        `getPrincipal` in interface `org.springframework.security.core.Authentication`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `Principal`

    - #### getAuthorities

          public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()

      Specified by:
        `getAuthorities` in interface `org.springframework.security.core.Authentication`

    - #### getCredentials

          public Object getCredentials()

      Specified by:
        `getCredentials` in interface `org.springframework.security.core.Authentication`

    - #### getDetails

          public Object getDetails()

      Specified by:
        `getDetails` in interface `org.springframework.security.core.Authentication`

    - #### isAuthenticated

          public boolean isAuthenticated()

      Specified by:
        `isAuthenticated` in interface `org.springframework.security.core.Authentication`

    - #### setAuthenticated

          public void setAuthenticated(boolean isAuthenticated)
                                throws IllegalArgumentException

      Specified by:
        `setAuthenticated` in interface `org.springframework.security.core.Authentication`
      Throws:
        `IllegalArgumentException`

    - #### toString

          public String toString()

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

Copyright © 2019 The Holon Platform. All rights reserved.