Interface IOAuthParameters
-
- All Known Implementing Classes:
OAuth20Parameters
public interface IOAuthParameters
A generic interface for OAuth Parameters- Since:
- 18650
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetAccessTokenUrl()Get the access token URLdefault java.lang.StringgetApiUrl()Get the actual API URLjava.lang.StringgetAuthorizationUrl()Get the base authorization URL to open in a browserdefault java.lang.StringgetAuthorizationUrl(java.lang.String state, java.lang.Enum<?>... scopes)Get the authorization URL to open in a browserdefault java.lang.StringgetAuthorizationUrl(java.lang.String state, java.lang.String... scopes)Get the authorization URL to open in a browserjava.lang.StringgetClientId()Get the client idjava.lang.StringgetClientSecret()Get the client secretOAuthVersiongetOAuthVersion()Get the OAuth version that the API expectsdefault java.lang.StringgetRedirectUri()Get the redirect URIvoidrememberPreferences()Store the preferences for these parametersdefault java.lang.StringtoPreferencesString()Convert to a preference string
-
-
-
Method Detail
-
getAccessTokenUrl
java.lang.String getAccessTokenUrl()
Get the access token URL- Returns:
- The URL to use to switch the code to a token
-
getAuthorizationUrl
java.lang.String getAuthorizationUrl()
Get the base authorization URL to open in a browser- Returns:
- The base URL to send to the browser
-
getAuthorizationUrl
default java.lang.String getAuthorizationUrl(java.lang.String state, java.lang.Enum<?>... scopes)
Get the authorization URL to open in a browser- Parameters:
state- The state to prevent attackers from providing their own tokenscopes- The scopes to request- Returns:
- The URL to send to the browser
-
getAuthorizationUrl
default java.lang.String getAuthorizationUrl(java.lang.String state, java.lang.String... scopes)
Get the authorization URL to open in a browser- Parameters:
state- The state to prevent attackers from providing their own tokenscopes- The scopes to request- Returns:
- The URL to send to the browser
-
getOAuthVersion
OAuthVersion getOAuthVersion()
Get the OAuth version that the API expects- Returns:
- The oauth version
-
getClientId
java.lang.String getClientId()
Get the client id- Returns:
- The client id
-
getClientSecret
java.lang.String getClientSecret()
Get the client secret- Returns:
- The client secret
-
getRedirectUri
default java.lang.String getRedirectUri()
Get the redirect URI- Returns:
- The redirect URI
-
toPreferencesString
default java.lang.String toPreferencesString()
Convert to a preference string- Returns:
- the preference string
-
getApiUrl
default java.lang.String getApiUrl()
Get the actual API URL- Returns:
- The API URl
-
rememberPreferences
void rememberPreferences()
Store the preferences for these parameters
-
-