Interface ServiceProviderTokenFactory
-
- All Known Implementing Classes:
ServiceProviderTokenFactoryImpl
public interface ServiceProviderTokenFactory
Provides methods for generating request and access tokens.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServiceProviderToken
generateAccessToken(ServiceProviderToken token)
Returns a newly generated access token for the authorized request token.ServiceProviderToken
generateRequestToken(Consumer consumer)
Generate an unauthorized request token.ServiceProviderToken
generateRequestToken(Consumer consumer, URI callback)
Generate an unauthorized request token.
-
-
-
Method Detail
-
generateRequestToken
ServiceProviderToken generateRequestToken(Consumer consumer)
Generate an unauthorized request token.- Parameters:
consumer
- Consumer information for generating the request token- Throws:
NullPointerException
- ifconsumer
is null
-
generateRequestToken
ServiceProviderToken generateRequestToken(Consumer consumer, URI callback)
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 eitherconsumer
orcallback
is null
-
generateAccessToken
ServiceProviderToken generateAccessToken(ServiceProviderToken token)
Returns a newly generated access token for the authorized request token.- Parameters:
token
- an authorized request token- Throws:
NullPointerException
- iftoken
is nullIllegalArgumentException
- thrown if the token is not an authorized request token
-
-