Class AuthenticationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mockserver.authentication.AuthenticationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JWTAuthenticationException, JWTKeyNotFoundAuthenticationException

public class AuthenticationException extends RuntimeException
See Also:
  • Constructor Details

    • AuthenticationException

      public AuthenticationException(String message)
    • AuthenticationException

      public AuthenticationException(String message, Throwable throwable)
    • AuthenticationException

      public AuthenticationException(String message, boolean clientSafeMessage)
    • AuthenticationException

      public AuthenticationException(String message, Throwable throwable, boolean clientSafeMessage)
  • Method Details

    • isClientSafeMessage

      public boolean isClientSafeMessage()
      Whether the exception message is safe to echo to the (unauthenticated) client in the 401 response body. Legacy JWT / mTLS handlers return true (their detailed message has always been surfaced to the client). The OIDC handler returns false so the detail (expected issuer, audience, required scopes, signature reasons) is logged SERVER-SIDE only and the client receives a generic body.