Package com.iizix.server.oauth
Class OAuthEngine
java.lang.Object
com.iizix.server.oauth.OAuthEngine
The OAuth (2) authentication engine.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- static OAuthEngineGets the currently initialized authentication engine.- static OAuthEngine- initializeNewInstance- (String baseURL) Initializes a new instance of the singleton authentication engine, replacing a previous one if present.- static booleanChecks if the URL is for authentication.- boolean- processAuthenticationCallbackURL- (String url, HttpServletRequest request, HttpServletResponse response) Processes the URL for authentication.
- Method Details- initializeNewInstanceInitializes a new instance of the singleton authentication engine, replacing a previous one if present.- Parameters:
- baseURL- The base URL of the server for redirection, e.g. http://my.internal.name:2800. It should contain the protocol http:// or https:// and perhaps a port as :2800 if it's not matching the HTTP (80) or HTTPS (443) ports.
- Returns:
- The singleton instance.
 
- getCurrentInstanceGets the currently initialized authentication engine.- Returns:
- The singleton instance.
- Throws:
- IllegalStateException- If the authentication engine is not initialized.
 
- isAuthenticationCallbackURLChecks if the URL is for authentication.- Parameters:
- url- The relative URL starting with '/'.
- Returns:
- true if it's an authentication URL, false otherwise.
 
- processAuthenticationCallbackURLpublic boolean processAuthenticationCallbackURL- (String url, HttpServletRequest request, HttpServletResponse response) throws IOException Processes the URL for authentication.- Parameters:
- url- The relative URL.
- request- The HTTP request.
- response- The response.
- Returns:
- true if the URL was processed, false if it's not an authentication URL.
- Throws:
- IOException- For I/O errors.