| Constructor and Description |
|---|
OauthEndpoint(HttpEndpointClient client) |
| Modifier and Type | Method and Description |
|---|---|
String |
authorizeUrl(String clientId)
Gets the URL to authorize a user for an application via the OAuth2 flow.
|
String |
authorizeUrl(String clientId,
Map<Object,Object> options)
Gets the URL to authorize a user for an application via the OAuth2 flow.
|
OauthToken |
exchangeAuthorizationForToken(String code,
String clientId,
String clientSecret)
Exchange the short-lived authorization code for an access token
that is used to authenticate API calls.
|
OauthToken |
exchangeAuthorizationForToken(String code,
String clientId,
String clientSecret,
Map<String,Object> options)
Exchange the short-lived authorization code for an access token
that is used to authenticate API calls.
|
public OauthEndpoint(HttpEndpointClient client)
public OauthToken exchangeAuthorizationForToken(String code, String clientId, String clientSecret) throws DnsimpleException, IOException
OauthexchangeAuthorizationForToken in interface Oauthcode - The authorization codeclientId - The client IDclientSecret - The client secretDnsimpleException - Any API errorIOException - Any IO errorpublic OauthToken exchangeAuthorizationForToken(String code, String clientId, String clientSecret, Map<String,Object> options) throws DnsimpleException, IOException
OauthexchangeAuthorizationForToken in interface Oauthcode - The authorization codeclientId - The client IDclientSecret - The client secretoptions - Map of optionsDnsimpleException - Any API errorIOException - Any IO errorpublic String authorizeUrl(String clientId)
OauthauthorizeUrl in interface OauthclientId - The client ID of the OAuth app in DNSimplepublic String authorizeUrl(String clientId, Map<Object,Object> options)
OauthauthorizeUrl in interface OauthclientId - The client ID of the OAuth app in DNSimpleoptions - A Map of options to include as parameters in the generated URLCopyright © 2017 DNSimple. All rights reserved.