Class Saml2AuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.springframework.security.core.AuthenticationException
-
- org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticationException
-
- All Implemented Interfaces:
java.io.Serializable
public class Saml2AuthenticationException extends AuthenticationException
This exception is thrown for all SAML 2.0 relatedAuthentication
errors.There are a number of scenarios where an error may occur, for example:
- The response or assertion request is missing or malformed
- Missing or invalid subject
- Missing or invalid signatures
- The time period validation for the assertion fails
- One of the assertion conditions was not met
- Decryption failed
- Unable to locate a subject identifier, commonly known as username
- Since:
- 5.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Saml2AuthenticationException(Saml2Error error)
Constructs aSaml2AuthenticationException
using the provided parameters.Saml2AuthenticationException(Saml2Error error, java.lang.String message)
Constructs aSaml2AuthenticationException
using the provided parameters.Saml2AuthenticationException(Saml2Error error, java.lang.String message, java.lang.Throwable cause)
Constructs aSaml2AuthenticationException
using the provided parameters.Saml2AuthenticationException(Saml2Error error, java.lang.Throwable cause)
Constructs aSaml2AuthenticationException
using the provided parameters.Saml2AuthenticationException(Saml2Error error)
Deprecated.UseSaml2Error
constructor insteadSaml2AuthenticationException(Saml2Error error, java.lang.String message)
Deprecated.UseSaml2Error
constructor insteadSaml2AuthenticationException(Saml2Error error, java.lang.String message, java.lang.Throwable cause)
Deprecated.UseSaml2Error
constructor insteadSaml2AuthenticationException(Saml2Error error, java.lang.Throwable cause)
Deprecated.UseSaml2Error
constructor instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Saml2Error
getError()
Deprecated.UsegetSaml2Error()
insteadSaml2Error
getSaml2Error()
Get the associatedSaml2Error
java.lang.String
toString()
-
-
-
Constructor Detail
-
Saml2AuthenticationException
public Saml2AuthenticationException(Saml2Error error)
Constructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
-
Saml2AuthenticationException
public Saml2AuthenticationException(Saml2Error error, java.lang.Throwable cause)
Constructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
cause
- the root cause
-
Saml2AuthenticationException
public Saml2AuthenticationException(Saml2Error error, java.lang.String message)
Constructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
message
- the detail message
-
Saml2AuthenticationException
public Saml2AuthenticationException(Saml2Error error, java.lang.String message, java.lang.Throwable cause)
Constructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
message
- the detail messagecause
- the root cause
-
Saml2AuthenticationException
@Deprecated public Saml2AuthenticationException(Saml2Error error)
Deprecated.UseSaml2Error
constructor insteadConstructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
-
Saml2AuthenticationException
@Deprecated public Saml2AuthenticationException(Saml2Error error, java.lang.Throwable cause)
Deprecated.UseSaml2Error
constructor insteadConstructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
cause
- the root cause
-
Saml2AuthenticationException
@Deprecated public Saml2AuthenticationException(Saml2Error error, java.lang.String message)
Deprecated.UseSaml2Error
constructor insteadConstructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
message
- the detail message
-
Saml2AuthenticationException
@Deprecated public Saml2AuthenticationException(Saml2Error error, java.lang.String message, java.lang.Throwable cause)
Deprecated.UseSaml2Error
constructor insteadConstructs aSaml2AuthenticationException
using the provided parameters.- Parameters:
error
- theSAML 2.0 Error
message
- the detail messagecause
- the root cause
-
-
Method Detail
-
getSaml2Error
public Saml2Error getSaml2Error()
Get the associatedSaml2Error
- Returns:
- the associated
Saml2Error
-
getError
@Deprecated public Saml2Error getError()
Deprecated.UsegetSaml2Error()
insteadReturns theSAML 2.0 Error
.- Returns:
- the
Saml2Error
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
-
-