public class OAuth extends Object implements Authentication
| Constructor and Description |
|---|
OAuth() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyToParams(List<Pair> queryParams,
Map<String,String> headerParams,
Map<String,String> cookieParams)
Apply authentication settings to header and query params.
|
void |
finishFlow(String code,
String state)
Finish the oauth flow after the user was redirected back.
|
void |
finishFlow(String code,
String state,
String codeVerifier)
Finish the oauth flow after the user was redirected back.
|
String |
getAccessToken() |
String |
getAuthorizationUri(String redirectUri,
Set<String> scopes,
String state)
Get the authorization uri, where the user logs in.
|
String |
getClientId() |
String |
getCodeVerifier() |
JWT |
getJWT()
Get JWT (JSON Web Token) WARNING: The JWT is unverified.
|
String |
getRefreshToken() |
void |
setAccessToken(String accessToken) |
void |
setAuth(String clientId,
String refreshToken) |
void |
setClientId(String clientId) |
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams, Map<String,String> cookieParams)
AuthenticationapplyToParams in interface AuthenticationqueryParams - List of query parametersheaderParams - Map of header parameterscookieParams - Map of cookie parameterspublic void setAccessToken(String accessToken)
public String getRefreshToken()
public String getClientId()
public void setClientId(String clientId)
public String getAccessToken()
public JWT getJWT()
public String getAuthorizationUri(String redirectUri, Set<String> scopes, String state)
redirectUri - Uri the user is redirected to, after successful authorization.
This must be the same as specified at the Eve Online developer
page.scopes - Scopes of the Eve Online SSO.state - This should be some secret to prevent XRSF, please read:
http://www.thread-safe.com/2014/05/the-correct-use-of-state-
parameter-in.htmlpublic String getCodeVerifier()
public void finishFlow(String code, String state, String codeVerifier) throws ApiException
code - Code returned by the Eve Online SSOstate - This should be some secret to prevent XRSF see
getAuthorizationUricodeVerifier - The PKCE code verifier used to generate the code challenge
(RFC 7636). Required if not called by the same instance that
called `getAuthorizationUri`ApiExceptionpublic void finishFlow(String code, String state) throws ApiException
code - Code returned by the Eve Online SSOstate - This should be some secret to prevent XRSF see
getAuthorizationUriApiExceptionCopyright © 2023. All Rights Reserved.