public class UnauthorizedRequestException
extends java.lang.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,
java.net.URI authorizationUri) |
| Modifier and Type | Method and Description |
|---|---|
java.net.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. |
public UnauthorizedRequestException(OAuthParameters parameters, java.net.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 java.net.URI getAuthorizationUri()
Copyright © 2016 Oracle Corporation. All Rights Reserved.