Class CookieAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
io.jmix.webdavrest.security.CookieAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class CookieAuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken
Spring security authentication token that is used to perform authentication request via CookieAuthenticationProvider. Contains both URL-token and cookie-token.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>>
  • Constructor Summary

    Constructors
    Constructor
    Description
    CookieAuthenticationToken(Object principal, String cookieToken, String urlToken)
     
    CookieAuthenticationToken(Object principal, String cookieToken, String urlToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    authenticated(Object principal, String cookieToken, String urlToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
    Create a fully authenticated authentication token
    void
     
     
     
     
     
    void
    setAuthenticated(boolean isAuthenticated)
     
    unauthenticated(Object principal, String cookieToken, String urlToken)
    Create an unauthenticated authentication token

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • CookieAuthenticationToken

      public CookieAuthenticationToken(Object principal, String cookieToken, String urlToken)
    • CookieAuthenticationToken

      public CookieAuthenticationToken(Object principal, String cookieToken, String urlToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
  • Method Details

    • unauthenticated

      public static CookieAuthenticationToken unauthenticated(Object principal, String cookieToken, String urlToken)
      Create an unauthenticated authentication token
      Parameters:
      principal - principal
      cookieToken - cookie-token value
      urlToken - URL-token value
      Returns:
      unauthenticated token object
    • authenticated

      public static CookieAuthenticationToken authenticated(Object principal, String cookieToken, String urlToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Create a fully authenticated authentication token
      Parameters:
      principal - principal
      cookieToken - cookie-token value
      urlToken - URL-token value
      authorities - authorities
      Returns:
      authenticated token object
    • getCredentials

      public Object getCredentials()
    • getPrincipal

      public Object getPrincipal()
    • getUrlToken

      public String getUrlToken()
    • getCookieToken

      public String getCookieToken()
    • setAuthenticated

      public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException
      Specified by:
      setAuthenticated in interface org.springframework.security.core.Authentication
      Overrides:
      setAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
      Throws:
      IllegalArgumentException
    • eraseCredentials

      public void eraseCredentials()
      Specified by:
      eraseCredentials in interface org.springframework.security.core.CredentialsContainer
      Overrides:
      eraseCredentials in class org.springframework.security.authentication.AbstractAuthenticationToken