com.holonplatform.spring.security.internal

## Class DefaultSpringSecurityAuthenticationToken

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

- All Implemented Interfaces:
    AuthenticationToken, CredentialsContainer, SpringSecurityAuthenticationToken, Serializable

      public class DefaultSpringSecurityAuthenticationToken
      extends Object
      implements SpringSecurityAuthenticationToken

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

- - ### Nested Class Summary

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

      `AuthenticationToken.AuthenticationTokenResolver<R extends Message>`

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

      `CredentialsContainer.CredentialsMatcher`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.security.core.Authentication` | `getAuthentication()` Get the Spring Security `Authentication` bound to this token.
    `Object` | `getCredentials()` Returns the credentials submitted during the authentication process that verifies the submitted `AuthenticationToken.getPrincipal()` account identity.
    `Object` | `getPrincipal()` Get the principal to which this authentication token refers, i.e.

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

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

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

      `account, create`

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

      `accountCredentials, bearer, httpBasicResolver, httpBearerResolver`

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

      `defaultMatcher`

- - ### Constructor Detail

    - #### DefaultSpringSecurityAuthenticationToken

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

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

  - ### Method Detail

    - #### getPrincipal

          public Object getPrincipal()

      Description copied from interface: `AuthenticationToken`
      Get the principal to which this authentication token refers, i.e. the account identity submitted during the authentication process.
      Specified by:
        `getPrincipal` in interface `AuthenticationToken`
      Returns:
        Principal to authenticate (for example a username)

    - #### getCredentials

          public Object getCredentials()

      Description copied from interface: `AuthenticationToken`
      Returns the credentials submitted during the authentication process that verifies the submitted `AuthenticationToken.getPrincipal()` account identity.
      Specified by:
        `getCredentials` in interface `AuthenticationToken`
      Specified by:
        `getCredentials` in interface `CredentialsContainer`
      Returns:
        the credential submitted by the user during the authentication process

    - #### getAuthentication

          public org.springframework.security.core.Authentication getAuthentication()

      Description copied from interface: `SpringSecurityAuthenticationToken`
      Get the Spring Security `Authentication` bound to this token.
      Specified by:
        `getAuthentication` in interface `SpringSecurityAuthenticationToken`
      Returns:
        The Spring Security `Authentication` (not null)

Copyright © 2019 The Holon Platform. All rights reserved.