Class BearerTokenErrors
java.lang.Object
org.springframework.security.oauth2.server.resource.BearerTokenErrors
A factory for creating
BearerTokenError
instances that correspond to the
registered Bearer Token Error
Codes.- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic BearerTokenError
insufficientScope
(String message, String scope) Create aBearerTokenError
caused by an invalid tokenstatic BearerTokenError
invalidRequest
(String message) Create aBearerTokenError
caused by an invalid requeststatic BearerTokenError
invalidToken
(String message) Create aBearerTokenError
caused by an invalid token
-
Method Details
-
invalidRequest
Create aBearerTokenError
caused by an invalid request- Parameters:
message
- a description of the error- Returns:
- a
BearerTokenError
-
invalidToken
Create aBearerTokenError
caused by an invalid token- Parameters:
message
- a description of the error- Returns:
- a
BearerTokenError
-
insufficientScope
Create aBearerTokenError
caused by an invalid token- Parameters:
scope
- the scope attribute to use in the error- Returns:
- a
BearerTokenError
-