public class ServletOAuthClient extends AbstractOAuthClient
authUrl, client, clientId, codeUrl, counter, password, stateCookieName, truststore
Constructor and Description |
---|
ServletOAuthClient() |
Modifier and Type | Method and Description |
---|---|
String |
getBearerToken(javax.servlet.http.HttpServletRequest request)
Obtain the code parameter from the url after being redirected back from the auth-server.
|
protected String |
getCode(javax.servlet.http.HttpServletRequest request) |
protected String |
getCookieValue(String name,
javax.servlet.http.HttpServletRequest request) |
void |
redirect(String redirectUri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Start the process of obtaining an access token by redirecting the browser
to the authentication server
|
void |
redirectRelative(String relativePath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Start the process of obtaining an access token by redirecting the browser
to the authentication server
|
getAuthUrl, getClient, getClientId, getCodeUrl, getPassword, getStateCode, getStateCookieName, getTruststore, resolveBearerToken, setAuthUrl, setClient, setClientId, setCodeUrl, setPassword, setStateCookieName, setTruststore, start, stop, stripOauthParametersFromRedirect
public void redirectRelative(String relativePath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
relativePath
- path relative to context root you want auth server to redirect back torequest
- response
- IOException
public void redirect(String redirectUri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
redirectUri
- full URI you want auth server to redirect back torequest
- response
- IOException
protected String getCookieValue(String name, javax.servlet.http.HttpServletRequest request)
protected String getCode(javax.servlet.http.HttpServletRequest request)
public String getBearerToken(javax.servlet.http.HttpServletRequest request) throws BadRequestException, InternalServerErrorException
request
- BadRequestException
InternalServerErrorException
Copyright © 2014. All Rights Reserved.