Class OAuth2TokenValidatorResult
java.lang.Object
org.springframework.security.oauth2.core.OAuth2TokenValidatorResult
A result emitted from an
OAuth2TokenValidator validation attempt.- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2TokenValidatorResultfailure(Collection<OAuth2Error> errors) Construct a failureOAuth2TokenValidatorResultwith the provided detail.static OAuth2TokenValidatorResultfailure(OAuth2Error... errors) Construct a failureOAuth2TokenValidatorResultwith the provided detail.Return error details regarding the validation attempt.booleanSay whether this result indicates success.static OAuth2TokenValidatorResultsuccess()Construct a successfulOAuth2TokenValidatorResult.
-
Method Details
-
hasErrors
public boolean hasErrors()Say whether this result indicates success.- Returns:
- whether this result has errors
-
getErrors
Return error details regarding the validation attempt.- Returns:
- the collection of results in this result, if any; returns an empty list otherwise
-
success
Construct a successfulOAuth2TokenValidatorResult.- Returns:
- an
OAuth2TokenValidatorResultwith no errors
-
failure
Construct a failureOAuth2TokenValidatorResultwith the provided detail.- Parameters:
errors- the list of errors- Returns:
- an
OAuth2TokenValidatorResultwith the errors specified
-
failure
Construct a failureOAuth2TokenValidatorResultwith the provided detail.- Parameters:
errors- the list of errors- Returns:
- an
OAuth2TokenValidatorResultwith the errors specified
-