Class LegacyImplicitErrorToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.irurueta.authserver.authorization.api.web.implicit.LegacyImplicitErrorToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class LegacyImplicitErrorToken extends org.springframework.security.authentication.AbstractAuthenticationToken
The result of a legacy implicit request that was refused after its redirect URI had been checked, so the refusal is sent to the client in the fragment of the redirect URI. It is marked authenticated only so the authorization endpoint hands it to the response handler instead of continuing the chain.
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>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    Human readable description of the error, null when there is none.
    private final String
    Error code.
    private final String
    The registered redirect URI the error is sent to.
    private static final long
    Serial version.
    private final String
    State of the request, null when it had none.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LegacyImplicitErrorToken(String error, String description, String redirectUri, String state)
    Creates the result.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the credentials, which a result has none of.
    Returns the description of the error.
    Returns the error code.
    Returns the principal, which a refusal has none of.
    Returns the redirect URI the error is sent to.
    Returns the state of the request.

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

    equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, 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
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial version.
      See Also:
    • error

      private final String error
      Error code.
    • description

      private final String description
      Human readable description of the error, null when there is none.
    • redirectUri

      private final String redirectUri
      The registered redirect URI the error is sent to.
    • state

      private final String state
      State of the request, null when it had none.
  • Constructor Details

    • LegacyImplicitErrorToken

      public LegacyImplicitErrorToken(String error, String description, String redirectUri, String state)
      Creates the result.
      Parameters:
      error - error code.
      description - description of the error, may be null.
      redirectUri - the registered redirect URI.
      state - state of the request, may be null.
  • Method Details

    • getError

      public String getError()
      Returns the error code.
      Returns:
      the code.
    • getDescription

      public String getDescription()
      Returns the description of the error.
      Returns:
      the description, null when there is none.
    • getRedirectUri

      public String getRedirectUri()
      Returns the redirect URI the error is sent to.
      Returns:
      the redirect URI.
    • getState

      public String getState()
      Returns the state of the request.
      Returns:
      the state, null when the request had none.
    • getCredentials

      public Object getCredentials()
      Returns the credentials, which a result has none of.
      Returns:
      an empty string.
    • getPrincipal

      public Object getPrincipal()
      Returns the principal, which a refusal has none of.
      Returns:
      the error code, so the token has a name.