Class OAuth20Exception
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.openstreetmap.josm.data.oauth.OAuthException
-
- org.openstreetmap.josm.data.oauth.OAuth20Exception
-
- All Implemented Interfaces:
java.io.Serializable
public final class OAuth20Exception extends OAuthException
A generic OAuth 2.0 exception- Since:
- 18650
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth20Exception.TypeInvalid request types
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDprivate OAuth20Exception.Typetype
-
Constructor Summary
Constructors Constructor Description OAuth20Exception(jakarta.json.JsonObject serverMessage)Create an exception from a server messageOAuth20Exception(java.lang.Exception cause)Create a new exception with a specified causeOAuth20Exception(java.lang.String message)Create a new exception with a given message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessage()(package private) OAuthVersion[]getOAuthVersions()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
type
private final OAuth20Exception.Type type
-
-
Constructor Detail
-
OAuth20Exception
public OAuth20Exception(java.lang.Exception cause)
Create a new exception with a specified cause- Parameters:
cause- The cause leading to this exception
-
OAuth20Exception
public OAuth20Exception(java.lang.String message)
Create a new exception with a given message- Parameters:
message- The message to use
-
OAuth20Exception
OAuth20Exception(jakarta.json.JsonObject serverMessage)
Create an exception from a server message- Parameters:
serverMessage- The server message. Should conform to RFC 6747 Section 4.2.2, but in JSON format.
-
-
Method Detail
-
getOAuthVersions
OAuthVersion[] getOAuthVersions()
- Specified by:
getOAuthVersionsin classOAuthException
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable
-
-