public class OpenIDConnectProvider extends Object implements LoginProviderLinkComputer
Constructor and Description |
---|
OpenIDConnectProvider(NuxeoOAuth2ServiceProvider oauth2Provider,
String accessTokenKey,
String userInfoURL,
Class<? extends OpenIDUserInfo> openIdUserInfoClass,
String icon,
boolean enabled,
RedirectUriResolver redirectUriResolver,
Class<? extends UserResolver> userResolverClass) |
Modifier and Type | Method and Description |
---|---|
String |
computeUrl(javax.servlet.http.HttpServletRequest req,
String requestedUrl)
Compute Url that should be used to login via this login provider.
|
String |
createStateToken(javax.servlet.http.HttpServletRequest request)
Create a state token to prevent request forgery.
|
String |
getAccessToken(javax.servlet.http.HttpServletRequest req,
String code) |
String |
getAuthenticationUrl(javax.servlet.http.HttpServletRequest req,
String requestedUrl) |
String |
getIcon() |
String |
getName() |
String |
getRedirectUri(javax.servlet.http.HttpServletRequest req) |
OpenIDUserInfo |
getUserInfo(String accessToken) |
UserResolver |
getUserResolver() |
boolean |
isEnabled() |
OpenIDUserInfo |
parseUserInfo(String userInfoJSON) |
boolean |
verifyStateToken(javax.servlet.http.HttpServletRequest request)
Ensure that this is no request forgery going on, and that the user
sending us this connect request is the user that was supposed to.
|
public OpenIDConnectProvider(NuxeoOAuth2ServiceProvider oauth2Provider, String accessTokenKey, String userInfoURL, Class<? extends OpenIDUserInfo> openIdUserInfoClass, String icon, boolean enabled, RedirectUriResolver redirectUriResolver, Class<? extends UserResolver> userResolverClass)
public String getRedirectUri(javax.servlet.http.HttpServletRequest req)
public String createStateToken(javax.servlet.http.HttpServletRequest request)
HttpServletRequest
- requestpublic boolean verifyStateToken(javax.servlet.http.HttpServletRequest request)
HttpServletRequest
- requestpublic String getAuthenticationUrl(javax.servlet.http.HttpServletRequest req, String requestedUrl)
public String getName()
public String getIcon()
public OpenIDUserInfo getUserInfo(String accessToken)
public OpenIDUserInfo parseUserInfo(String userInfoJSON) throws IOException
IOException
public boolean isEnabled()
public UserResolver getUserResolver()
public String computeUrl(javax.servlet.http.HttpServletRequest req, String requestedUrl)
LoginProviderLinkComputer
computeUrl
in interface LoginProviderLinkComputer
Copyright © 2014 Nuxeo SA. All rights reserved.