Class ServiceProviderTokenFactoryImpl
- java.lang.Object
-
- com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.token.ServiceProviderTokenFactoryImpl
-
- All Implemented Interfaces:
ServiceProviderTokenFactory
@Singleton public class ServiceProviderTokenFactoryImpl extends Object implements ServiceProviderTokenFactory
Implementation ofServiceProviderTokenFactory
that usesrandomly generated values
to generate request and access tokens.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceProviderTokenFactoryImpl.RequestTokenGenerationRequest
-
Constructor Summary
Constructors Constructor Description ServiceProviderTokenFactoryImpl(Randomizer randomizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceProviderToken
generateAccessToken(ServiceProviderToken requestToken)
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.
-
-
-
Constructor Detail
-
ServiceProviderTokenFactoryImpl
@Inject public ServiceProviderTokenFactoryImpl(Randomizer randomizer)
-
-
Method Detail
-
generateAccessToken
public ServiceProviderToken generateAccessToken(ServiceProviderToken requestToken)
Description copied from interface:ServiceProviderTokenFactory
Returns a newly generated access token for the authorized request token.- Specified by:
generateAccessToken
in interfaceServiceProviderTokenFactory
- Parameters:
requestToken
- an authorized request token
-
generateRequestToken
public ServiceProviderToken generateRequestToken(Consumer consumer)
Description copied from interface:ServiceProviderTokenFactory
Generate an unauthorized request token.- Specified by:
generateRequestToken
in interfaceServiceProviderTokenFactory
- Parameters:
consumer
- Consumer information for generating the request token
-
generateRequestToken
public ServiceProviderToken generateRequestToken(Consumer consumer, URI callback)
Description copied from interface:ServiceProviderTokenFactory
Generate an unauthorized request token.- Specified by:
generateRequestToken
in interfaceServiceProviderTokenFactory
- Parameters:
consumer
- Consumer information for generating the request token, cannot be nullcallback
- parsed and validated OAuth callbackURI
, cannot be null (useServiceProviderTokenFactory.generateRequestToken(Consumer)
if not providing acallback
)
-
-