Interface ServiceProviderTokenFactory
- All Known Implementing Classes:
ServiceProviderTokenFactoryImpl
public interface ServiceProviderTokenFactory
Provides methods for generating request and access tokens.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a newly generated access token for the authorized request token.generateRequestToken(Consumer consumer) Generate an unauthorized request token.generateRequestToken(Consumer consumer, URI callback) Generate an unauthorized request token.
-
Method Details
-
generateRequestToken
Generate an unauthorized request token.- Parameters:
consumer- Consumer information for generating the request token- Throws:
NullPointerException- ifconsumeris null
-
generateRequestToken
Generate an unauthorized request token.- Parameters:
consumer- Consumer information for generating the request token, cannot be nullcallback- parsed and validated OAuth callbackURI, cannot be null (usegenerateRequestToken(Consumer)if not providing acallback)- Throws:
NullPointerException- if eitherconsumerorcallbackis null
-
generateAccessToken
Returns a newly generated access token for the authorized request token.- Parameters:
token- an authorized request token- Throws:
NullPointerException- iftokenis nullIllegalArgumentException- thrown if the token is not an authorized request token
-