Class OAuthFlowException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.rest.auth.oauth.flow.OAuthFlowException
- All Implemented Interfaces:
Serializable
Runtime exception thrown by any OAuth flow helper when the IdP rejects the request, the HTTP round-trip
fails, or the response can't be parsed.
Unchecked because flow acquisition is typically called from startup or service-initialization code where checked exceptions would bloat call sites.
- Since:
- 10.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthFlowException(String msg) Constructor.OAuthFlowException(String msg, String errorCode) Constructor carrying the OAuth error code returned by the IdP (RFC 6749 §5.2).OAuthFlowException(String msg, Throwable cause) Constructor. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OAuthFlowException
Constructor.- Parameters:
msg- The detail message. May benull.
-
OAuthFlowException
Constructor.- Parameters:
msg- The detail message. May benull.cause- The cause. May benull.
-
OAuthFlowException
Constructor carrying the OAuth error code returned by the IdP (RFC 6749 §5.2).- Parameters:
msg- The detail message. May benull.errorCode- The OAutherrorcode (e.g."invalid_grant"). May benull.
-
-
Method Details
-
errorCode
Returns the OAutherrorcode the IdP returned, if this exception represents a token-endpoint error response (RFC 6749 §5.2).- Returns:
- The error code (e.g.
"invalid_grant"), orOptional.empty()if not an IdP error response.
-