Interface OAuthServiceProvider
-
public interface OAuthServiceProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuthToken
getAccessToken(OAuthVerifier verifier)
Retrieve the access tokenString
getAuthorizationUrl()
Returns the URL where you should redirect your users to authenticate your application.String
getName()
Returns the name of this service.OAuthUserInfo
getUserInfo(OAuthToken token)
After establishing of secure communication channel, this method supossed to access the protected resoure and retrieve the username.String
getVersion()
Returns the OAuth version of the service.
-
-
-
Method Detail
-
getAuthorizationUrl
String getAuthorizationUrl()
Returns the URL where you should redirect your users to authenticate your application.- Returns:
- the OAuth service URL to redirect your users for authentication
-
getAccessToken
OAuthToken getAccessToken(OAuthVerifier verifier)
Retrieve the access token- Parameters:
verifier
- verifier code- Returns:
- access token
-
getUserInfo
OAuthUserInfo getUserInfo(OAuthToken token) throws IOException
After establishing of secure communication channel, this method supossed to access the protected resoure and retrieve the username.- Returns:
- OAuth user information
- Throws:
IOException
-
getVersion
String getVersion()
Returns the OAuth version of the service.- Returns:
- oauth version as string
-
getName
String getName()
Returns the name of this service. This name is resented the user to choose between multiple service providers- Returns:
- name of the service
-
-