public class CasOAuthWrapperClient extends BaseOAuth20Client<CasOAuthWrapperProfile>
This class is the OAuth client to authenticate users on CAS servers using OAuth wrapper.
The url of the OAuth endpoint of the CAS server must be set by using the setCasOAuthUrl(String) method.
It returns a CasOAuthWrapperProfile.
More information at https://wiki.jasig.org/display/CASUM/OAuth+server+support
CasOAuthWrapperProfilelogger, OAUTH_CODEconnectTimeout, key, proxyHost, proxyPort, readTimeout, secret, service, tokenAsHeaderATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, NEEDS_CLIENT_REDIRECTION_PARAMETER| Constructor and Description |
|---|
CasOAuthWrapperClient() |
CasOAuthWrapperClient(String key,
String secret,
String casOAuthUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected CasOAuthWrapperProfile |
extractUserProfile(String body)
Extract the user profile from the response (JSON, XML...) of the profile url.
|
String |
getCasOAuthUrl() |
protected String |
getProfileUrl(org.scribe.model.Token accessToken)
Retrieve the url of the profile of the authenticated user for the provider.
|
protected boolean |
hasBeenCancelled(WebContext context)
Return if the authentication has been cancelled.
|
protected void |
internalInit(WebContext context) |
boolean |
isSpringSecurityCompliant() |
protected CasOAuthWrapperClient |
newClient() |
void |
setCasOAuthUrl(String casOAuthUrl) |
void |
setSpringSecurityCompliant(boolean springSecurityCompliant) |
getAccessToken, getOAuthCredentials, isDirectRedirection, retrieveAuthorizationUrladdAccessTokenToProfile, clone, createProxyRequest, getClientType, getConnectTimeout, getKey, getProxyHost, getProxyPort, getReadTimeout, getSecret, getUserProfile, isTokenAsHeader, retrieveCredentials, retrieveRedirectAction, retrieveUserProfile, retrieveUserProfileFromToken, sendRequestForData, sendRequestForData, setConnectTimeout, setKey, setProxyHost, setProxyPort, setReadTimeout, setSecret, setTokenAsHeadercomputeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getRedirectAction, getRedirectionUrl, getStateParameter, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrladdAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName, toStringinit, reinitprotected CasOAuthWrapperClient newClient()
newClient in class BaseClient<OAuthCredentials,CasOAuthWrapperProfile>protected void internalInit(WebContext context)
internalInit in class BaseOAuthClient<CasOAuthWrapperProfile>protected String getProfileUrl(org.scribe.model.Token accessToken)
BaseOAuthClientgetProfileUrl in class BaseOAuthClient<CasOAuthWrapperProfile>accessToken - only used when constructing dynamic urls from data in the tokenprotected CasOAuthWrapperProfile extractUserProfile(String body)
BaseOAuthClientextractUserProfile in class BaseOAuthClient<CasOAuthWrapperProfile>body - the response bodypublic String getCasOAuthUrl()
public void setCasOAuthUrl(String casOAuthUrl)
public boolean isSpringSecurityCompliant()
public void setSpringSecurityCompliant(boolean springSecurityCompliant)
protected boolean hasBeenCancelled(WebContext context)
BaseOAuthClienthasBeenCancelled in class BaseOAuthClient<CasOAuthWrapperProfile>context - the web context.Copyright © 2016. All Rights Reserved.