Class OAuth2TokenValidatorResult
- java.lang.Object
-
- org.springframework.security.oauth2.core.OAuth2TokenValidatorResult
-
public final class OAuth2TokenValidatorResult extends java.lang.ObjectA result emitted from anOAuth2TokenValidatorvalidation attempt- Since:
- 5.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OAuth2TokenValidatorResultfailure(java.util.Collection<OAuth2Error> errors)Construct a failureOAuth2TokenValidatorResultwith the provided detailstatic OAuth2TokenValidatorResultfailure(OAuth2Error... errors)Construct a failureOAuth2TokenValidatorResultwith the provided detailjava.util.Collection<OAuth2Error>getErrors()Return error details regarding the validation attemptbooleanhasErrors()Say whether this result indicates successstatic OAuth2TokenValidatorResultsuccess()Construct a successfulOAuth2TokenValidatorResult
-
-
-
Method Detail
-
hasErrors
public boolean hasErrors()
Say whether this result indicates success- Returns:
- whether this result has errors
-
getErrors
public java.util.Collection<OAuth2Error> getErrors()
Return error details regarding the validation attempt- Returns:
- the collection of results in this result, if any; returns an empty list otherwise
-
success
public static OAuth2TokenValidatorResult success()
Construct a successfulOAuth2TokenValidatorResult- Returns:
- an
OAuth2TokenValidatorResultwith no errors
-
failure
public static OAuth2TokenValidatorResult failure(OAuth2Error... errors)
Construct a failureOAuth2TokenValidatorResultwith the provided detail- Parameters:
errors- the list of errors- Returns:
- an
OAuth2TokenValidatorResultwith the errors specified
-
failure
public static OAuth2TokenValidatorResult failure(java.util.Collection<OAuth2Error> errors)
Construct a failureOAuth2TokenValidatorResultwith the provided detail- Parameters:
errors- the list of errors- Returns:
- an
OAuth2TokenValidatorResultwith the errors specified
-
-