public class AuthInterface
extends java.lang.Object
| Constructor and Description |
|---|
AuthInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport)
Construct the AuthInterface.
|
| Modifier and Type | Method and Description |
|---|---|
Auth |
checkToken(java.lang.String authToken,
java.lang.String tokenSecret) |
Auth |
checkToken(org.scribe.model.Token accessToken)
Returns the credentials attached to an OAuth authentication token.
|
org.scribe.model.Token |
exchangeAuthToken(java.lang.String authToken)
Exchange an auth token from the old Authentication API, to an OAuth access token.
|
org.scribe.model.Token |
getAccessToken(org.scribe.model.Token oAuthRequestToken,
org.scribe.model.Verifier verifier)
Trade the request token for an access token, this is step three of authorization.
|
java.lang.String |
getAuthorizationUrl(org.scribe.model.Token oAuthRequestToken,
Permission permission)
Get the auth URL, this is step two of authorization.
|
org.scribe.model.Token |
getRequestToken()
Get the OAuth request token - this is step one of authorization.
|
org.scribe.model.Token |
getRequestToken(java.lang.String callbackUrl)
Get the OAuth request token - this is step one of authorization.
|
void |
setMaxGetTokenRetries(int maxGetTokenRetries) |
public AuthInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport)
apiKey - The API keytransport - The Transport interfacepublic org.scribe.model.Token getRequestToken()
Token, store this for when the user returns from the Flickr website.public org.scribe.model.Token getRequestToken(java.lang.String callbackUrl)
callbackUrl - optional callback URL - required for web auth flow, will be set to "oob" if not specified.Token, store this for when the user returns from the Flickr website.public java.lang.String getAuthorizationUrl(org.scribe.model.Token oAuthRequestToken,
Permission permission)
oAuthRequestToken - the token from a getRequestToken() call.public org.scribe.model.Token getAccessToken(org.scribe.model.Token oAuthRequestToken,
org.scribe.model.Verifier verifier)
oAuthRequestToken - this is the token returned by the getRequestToken() call.verifier - the Verifier created from the code entered by a user or passed back to a callback URL.public Auth checkToken(org.scribe.model.Token accessToken) throws FlickrException
accessToken - The authentication tokenFlickrExceptionpublic Auth checkToken(java.lang.String authToken, java.lang.String tokenSecret) throws FlickrException
authToken - The authentication tokentokenSecret - FlickrExceptionpublic org.scribe.model.Token exchangeAuthToken(java.lang.String authToken)
throws FlickrException
authToken - FlickrExceptionpublic void setMaxGetTokenRetries(int maxGetTokenRetries)