public class UnauthorizedRequestException extends RuntimeException
OAuthClientFilter
if
the request is not properly authorized. I.e. either when the user authorization
of a request token is required and has not been provided by the OAuthClientFilter.AuthHandler
or if the request token got revoked by the user - i.e. the verifier provided by the
OAuthClientFilter.AuthHandler
was either null or invalid.
In the first case, client may redirect user to the URI returned
from getAuthorizationUri()
.
Once authorization is obtained, client should add verifier code returned
by the server into OAuth parameters object returned from
getOAuthParameters()
.
In the second case getAuthorizationUri()
returns null.Constructor and Description |
---|
UnauthorizedRequestException(OAuthParameters parameters,
URI authorizationUri) |
Modifier and Type | Method and Description |
---|---|
URI |
getAuthorizationUri()
Returns authorization URI the user can be redirected to to provide authorization,
or null if there is no request token to be authorized (i.e.
|
OAuthParameters |
getOAuthParameters()
Returns OAuthParameters structure used by the
OAuthClientFilter . |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public UnauthorizedRequestException(OAuthParameters parameters, URI authorizationUri)
public OAuthParameters getOAuthParameters()
OAuthClientFilter
.
Can be used to update parameters to make the next request not fail (i.e. set a new
verification code).public URI getAuthorizationUri()
Copyright © 2013 Oracle Corporation. All rights reserved.