Package org.apache.ofbiz.passport.event
Class GitHubEvents
- java.lang.Object
-
- org.apache.ofbiz.passport.event.GitHubEvents
-
public class GitHubEvents extends java.lang.Object
GitHubEvents - Events for GitHub login. Refs: https://developer.github.com/v3/oauth/
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ApiEndpoint
static java.lang.String
AuthorizeUri
static java.lang.String
DEFAULT_SCOPE
static java.lang.String
envPrefix
static java.lang.String
module
static java.lang.String
resource
static java.lang.String
SESSION_GITHUB_STATE
static java.lang.String
TokenEndpoint
static java.lang.String
TokenServiceUri
static java.lang.String
UserApiUri
-
Constructor Summary
Constructors Constructor Description GitHubEvents()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GenericValue
getOAuth2GitHubConfig(javax.servlet.http.HttpServletRequest request)
static GenericValue
getOAuth2GitHubConfig(Delegator delegator, java.lang.String productStoreId)
static java.lang.String
gitHubRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Redirect to GitHub login page.static java.lang.String
parseGitHubResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Parse GitHub login response and login the user if possible.
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
AuthorizeUri
public static final java.lang.String AuthorizeUri
- See Also:
- Constant Field Values
-
TokenServiceUri
public static final java.lang.String TokenServiceUri
- See Also:
- Constant Field Values
-
UserApiUri
public static final java.lang.String UserApiUri
- See Also:
- Constant Field Values
-
DEFAULT_SCOPE
public static final java.lang.String DEFAULT_SCOPE
- See Also:
- Constant Field Values
-
ApiEndpoint
public static final java.lang.String ApiEndpoint
- See Also:
- Constant Field Values
-
TokenEndpoint
public static final java.lang.String TokenEndpoint
- See Also:
- Constant Field Values
-
SESSION_GITHUB_STATE
public static final java.lang.String SESSION_GITHUB_STATE
- See Also:
- Constant Field Values
-
envPrefix
public static final java.lang.String envPrefix
-
-
Method Detail
-
gitHubRedirect
public static java.lang.String gitHubRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Redirect to GitHub login page.- Returns:
-
parseGitHubResponse
public static java.lang.String parseGitHubResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Parse GitHub login response and login the user if possible.- Returns:
-
getOAuth2GitHubConfig
public static GenericValue getOAuth2GitHubConfig(javax.servlet.http.HttpServletRequest request)
-
getOAuth2GitHubConfig
public static GenericValue getOAuth2GitHubConfig(Delegator delegator, java.lang.String productStoreId) throws GenericEntityException
- Throws:
GenericEntityException
-
-