Interface IOAuthParameters
- All Known Implementing Classes:
OAuth20Parameters
public interface IOAuthParameters
A generic interface for OAuth Parameters
- Since:
- 18650
-
Method Summary
Modifier and TypeMethodDescriptionGet the access token URLdefault StringGet the actual API URLGet the base authorization URL to open in a browserdefault StringgetAuthorizationUrl(String state, Enum<?>... scopes) Get the authorization URL to open in a browserdefault StringgetAuthorizationUrl(String state, String... scopes) Get the authorization URL to open in a browserGet the client idGet the client secretGet the OAuth version that the API expectsdefault StringGet the redirect URIvoidStore the preferences for these parametersdefault StringConvert to a preference string
-
Method Details
-
getAccessTokenUrl
Get the access token URL- Returns:
- The URL to use to switch the code to a token
-
getAuthorizationUrl
Get the base authorization URL to open in a browser- Returns:
- The base URL to send to the browser
-
getAuthorizationUrl
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
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
Get the OAuth version that the API expects- Returns:
- The oauth version
-
getClientId
Get the client id- Returns:
- The client id
-
getClientSecret
Get the client secret- Returns:
- The client secret
-
getRedirectUri
Get the redirect URI- Returns:
- The redirect URI
-
toPreferencesString
Convert to a preference string- Returns:
- the preference string
-
getApiUrl
Get the actual API URL- Returns:
- The API URl
-
rememberPreferences
void rememberPreferences()Store the preferences for these parameters
-