Class InsufficientUserAuthenticationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.irurueta.authserver.authorization.api.web.mfa.InsufficientUserAuthenticationException
All Implemented Interfaces:
Serializable

public class InsufficientUserAuthenticationException extends RuntimeException
Thrown by StepUpGuard when the bearer token of an API call does not show a recent enough multi-factor sign-in for the operation. MfaExceptionHandler answers it as RFC 9470 describes: 401 with WWW-Authenticate: Bearer error="insufficient_user_authentication" and the acr_values and max_age the client must ask for.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version.
      See Also:
    • acrValues

      private final String acrValues
      Authentication context class the operation requires.
    • maxAge

      private final Duration maxAge
      Maximum age of the sign-in the operation accepts.
  • Constructor Details

    • InsufficientUserAuthenticationException

      public InsufficientUserAuthenticationException(String acrValues, Duration maxAge)
      Creates the exception.
      Parameters:
      acrValues - authentication context class the operation requires.
      maxAge - maximum age of the sign-in the operation accepts.
  • Method Details

    • getAcrValues

      public String getAcrValues()
      Gets the authentication context class the operation requires.
      Returns:
      the value for the acr_values parameter.
    • getMaxAge

      public Duration getMaxAge()
      Gets the maximum age of the sign-in the operation accepts.
      Returns:
      the maximum age.