Class Saml2ResponseValidatorResult
- java.lang.Object
-
- org.springframework.security.saml2.core.Saml2ResponseValidatorResult
-
public final class Saml2ResponseValidatorResult extends java.lang.ObjectA result emitted from a SAML 2.0 Response validation attempt- Since:
- 5.4
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Saml2ResponseValidatorResultconcat(Saml2Error error)Return a newSaml2ResponseValidatorResultthat contains both the givenSaml2Errorand the errors from the resultSaml2ResponseValidatorResultconcat(Saml2ResponseValidatorResult result)Return a newSaml2ResponseValidatorResultthat contains the errors from the givenSaml2ResponseValidatorResultas well as this result.static Saml2ResponseValidatorResultfailure(java.util.Collection<Saml2Error> errors)Construct a failureSaml2ResponseValidatorResultwith the provided detailstatic Saml2ResponseValidatorResultfailure(Saml2Error... errors)Construct a failureSaml2ResponseValidatorResultwith the provided detailjava.util.Collection<Saml2Error>getErrors()Return error details regarding the validation attemptbooleanhasErrors()Say whether this result indicates successstatic Saml2ResponseValidatorResultsuccess()Construct a successfulSaml2ResponseValidatorResult
-
-
-
Method Detail
-
hasErrors
public boolean hasErrors()
Say whether this result indicates success- Returns:
- whether this result has errors
-
getErrors
public java.util.Collection<Saml2Error> getErrors()
Return error details regarding the validation attempt- Returns:
- the collection of results in this result, if any; returns an empty list otherwise
-
concat
public Saml2ResponseValidatorResult concat(Saml2Error error)
Return a newSaml2ResponseValidatorResultthat contains both the givenSaml2Errorand the errors from the result- Parameters:
error- theSaml2Errorto append- Returns:
- a new
Saml2ResponseValidatorResultfor further reporting
-
concat
public Saml2ResponseValidatorResult concat(Saml2ResponseValidatorResult result)
Return a newSaml2ResponseValidatorResultthat contains the errors from the givenSaml2ResponseValidatorResultas well as this result.- Parameters:
result- theSaml2ResponseValidatorResultto merge with this one- Returns:
- a new
Saml2ResponseValidatorResultfor further reporting
-
success
public static Saml2ResponseValidatorResult success()
Construct a successfulSaml2ResponseValidatorResult- Returns:
- an
Saml2ResponseValidatorResultwith no errors
-
failure
public static Saml2ResponseValidatorResult failure(Saml2Error... errors)
Construct a failureSaml2ResponseValidatorResultwith the provided detail- Parameters:
errors- the list of errors- Returns:
- an
Saml2ResponseValidatorResultwith the errors specified
-
failure
public static Saml2ResponseValidatorResult failure(java.util.Collection<Saml2Error> errors)
Construct a failureSaml2ResponseValidatorResultwith the provided detail- Parameters:
errors- the list of errors- Returns:
- an
Saml2ResponseValidatorResultwith the errors specified
-
-