Class OAuth2Error
- java.lang.Object
-
- org.springframework.security.oauth2.core.OAuth2Error
-
- All Implemented Interfaces:
java.io.Serializable
public class OAuth2Error extends java.lang.Object implements java.io.SerializableA representation of an OAuth 2.0 Error.At a minimum, an error response will contain an error code. The error code may be one of the standard codes defined by the specification, or a new code defined in the OAuth Extensions Error Registry, for cases where protocol extensions require additional error code(s) above the standard codes.
- Since:
- 5.0
- See Also:
OAuth2ErrorCodes, Section 11.4 OAuth Extensions Error Registry, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAuth2Error(java.lang.String errorCode)Constructs anOAuth2Errorusing the provided parameters.OAuth2Error(java.lang.String errorCode, java.lang.String description, java.lang.String uri)Constructs anOAuth2Errorusing the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Returns the error description.java.lang.StringgetErrorCode()Returns the error code.java.lang.StringgetUri()Returns the error uri.java.lang.StringtoString()
-
-
-
Constructor Detail
-
OAuth2Error
public OAuth2Error(java.lang.String errorCode)
Constructs anOAuth2Errorusing the provided parameters.- Parameters:
errorCode- the error code
-
OAuth2Error
public OAuth2Error(java.lang.String errorCode, java.lang.String description, java.lang.String uri)Constructs anOAuth2Errorusing the provided parameters.- Parameters:
errorCode- the error codedescription- the error descriptionuri- the error uri
-
-
Method Detail
-
getErrorCode
public final java.lang.String getErrorCode()
Returns the error code.- Returns:
- the error code
-
getDescription
public final java.lang.String getDescription()
Returns the error description.- Returns:
- the error description
-
getUri
public final java.lang.String getUri()
Returns the error uri.- Returns:
- the error uri
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-