com.holonplatform.spring.security.internal

## Class DefaultSpringSecurityAuthentication

- java.lang.Object
- - com.holonplatform.core.internal.DefaultParameterSet
  - - com.holonplatform.spring.security.internal.DefaultSpringSecurityAuthentication

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

      public class DefaultSpringSecurityAuthentication
      extends DefaultParameterSet
      implements SpringSecurityAuthentication

  Default `SpringSecurityAuthentication` implementation.
  Since:
    5.1.0
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.holonplatform.core.internal.DefaultParameterSet

      `DefaultParameterSet.AbstractBuilder<S extends ParameterSet,I extends DefaultParameterSet,B extends ParameterSet.Builder<S>>, DefaultParameterSet.DefaultBuilder`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.auth.Authentication

      `Authentication.AuthenticationListener, Authentication.AuthenticationNotifier, Authentication.Builder`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.spring.security.SpringSecurityAuthentication

      `AUTHENTICATION_DETAILS_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSpringSecurityAuthentication(org.springframework.security.core.Authentication authentication)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `Collection<? extends org.springframework.security.core.GrantedAuthority>` | `getAuthorities()`
    `Object` | `getCredentials()`
    `Object` | `getDetails()`
    `String` | `getName()`
    `Collection<Permission>` | `getPermissions()` Set of `Permission`s granted to principal with this Authentication
    `Object` | `getPrincipal()`
    `Optional<String>` | `getScheme()` Get the authentication scheme with which this authentication was produced.
    `int` | `hashCode()`
    `boolean` | `isAuthenticated()`
    `boolean` | `isRoot()` If this method returns `true`, this Authentication is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted to this Authentication.
    `void` | `setAuthenticated(boolean isAuthenticated)`
    `String` | `toString()`

    - ### Methods inherited from class com.holonplatform.core.internal.DefaultParameterSet

      `addParameter, forEachParameter, getParameter, getParameter, getParameterIf, hasNotNullParameter, hasParameter, hasParameters, hasParameterValue, removeParameter`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.spring.security.SpringSecurityAuthentication

      `create`

    - ### Methods inherited from interface com.holonplatform.auth.Authentication

      `builder`

    - ### Methods inherited from interface com.holonplatform.core.ParameterSet

      `builder, empty, forEachParameter, getParameter, getParameter, getParameter, getParameter, getParameter, getParameterIf, getParameterIf, hasNotNullParameter, hasNotNullParameter, hasParameter, hasParameter, hasParameters, hasParameterValue, hasParameterValue`

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

      `implies`

- - ### Constructor Detail

    - #### DefaultSpringSecurityAuthentication

          public DefaultSpringSecurityAuthentication(org.springframework.security.core.Authentication authentication)

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

  - ### Method Detail

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `Principal`

    - #### getScheme

          public Optional<String> getScheme()

      Description copied from interface: `Authentication`
      Get the authentication scheme with which this authentication was produced.
      Returns:
        Optional authentication scheme name

    - #### getPermissions

          public Collection<Permission> getPermissions()

      Description copied from interface: `Authentication`
      Set of `Permission`s granted to principal with this Authentication
      Returns:
        Granted permissions, or an empty Collection if none

    - #### isRoot

          public boolean isRoot()

      Description copied from interface: `Authentication`
      If this method returns `true`, this Authentication is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted to this Authentication.
      Returns:
        `true` if this Authentication is considered a `root` 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`

    - #### getPrincipal

          public Object getPrincipal()

      Specified by:
        `getPrincipal` 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`

    - #### hashCode

          public int hashCode()

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

    - #### equals

          public boolean equals(Object obj)

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

    - #### toString

          public String toString()

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

Copyright © 2019 The Holon Platform. All rights reserved.