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-side OAuthHandler to indicate a remote OSLC application requires a user log-in and approval to allow accessing a resource.
Since:
1.3.0
See Also:
  • Constructor Details

    • 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 Details

    • 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