Package com.sodius.oslc.server.oauth
Class RedirectOAuthException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.oauth.OAuthException
-
- com.sodius.oslc.server.oauth.RedirectOAuthException
-
- All Implemented Interfaces:
Serializable
public class RedirectOAuthException extends net.oauth.OAuthException
Exception used by a server-sideOAuthHandler
to indicate a remote OSLC application requires a user log-in and approval to allow accessing a resource.- Since:
- 1.3.0
- See Also:
RedirectOAuthHandler
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RedirectOAuthException(URI location)
Creates a new exception wrapping the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.RedirectOAuthException(URI location, boolean downstream)
Creates a new exception wrapping the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getLocation()
Returns the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.boolean
isDownstream()
Indicates whether this exception's location is the URL of a third-party authorization page.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RedirectOAuthException
public RedirectOAuthException(URI location)
Creates a new exception wrapping the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.- Parameters:
location
- the URL to display in a web browser.
-
RedirectOAuthException
public RedirectOAuthException(URI location, boolean downstream)
Creates a new exception wrapping the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.- Parameters:
location
- the URL to display in a web browser.downstream
- true is the location URL is a third-party required by the remote OSLC application, false if it is the OSLC application itself- Since:
- 1.8.0
-
-
Method Detail
-
getLocation
public URI getLocation()
Returns the URL to display in a web browser for the user to log-in and approve accessing the remote OSLC application.- Returns:
- the URL to display in a web browser.
-
isDownstream
public boolean isDownstream()
Indicates whether this exception's location is the URL of a third-party authorization page. This can be the case when a remote OSLC application requires a log-in to a third-party.- Returns:
- true if this exception's location is the URL of a third-party authorization page, false if it is the authorization page of the OSLC application itself
- Since:
- 1.8.0
-
-