Class ServiceProviderToken.ServiceProviderTokenBuilder
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.applink.oauth.Token.TokenBuilder<ServiceProviderToken,ServiceProviderToken.ServiceProviderTokenBuilder>
com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.token.ServiceProviderToken.ServiceProviderTokenBuilder
- Enclosing class:
- ServiceProviderToken
public static final class ServiceProviderToken.ServiceProviderTokenBuilder
extends Token.TokenBuilder<ServiceProviderToken,ServiceProviderToken.ServiceProviderTokenBuilder>
-
Method Summary
Modifier and TypeMethodDescriptionauthorizedBy
(String user) Sets theuser
that authorized the request token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.build()
Constructs and returns the final requestToken
instance.Sets thecallback
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.creationTime
(long creationTime) Sets thecreationTime
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.Sets theuser
that denied the request token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.session
(ServiceProviderToken.Session session) Sets thesession
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.timeToLive
(long timeToLive) Sets thetimeToLive
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.Sets theverifier
value to use to determine that the authorizing user is the same as the user swapping the request token for an access token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.Methods inherited from class com.atlassian.bitbucket.jenkins.internal.applink.oauth.Token.TokenBuilder
consumer, properties, tokenSecret
-
Method Details
-
authorizedBy
Sets theuser
that authorized the request token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
user
- name of the user that authorized theConsumer
to make requests on behalf of themselves- Returns:
this
builder
-
deniedBy
Sets theuser
that denied the request token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
user
- name of the user that denied theConsumer
to make requests on behalf of themselves- Returns:
this
builder
-
verifier
Sets theverifier
value to use to determine that the authorizing user is the same as the user swapping the request token for an access token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
verifier
- value to use to determine that the authorizing user is the same as the user swapping the request token for an access token- Returns:
this
builder
-
creationTime
Sets thecreationTime
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
creationTime
- time the token was originally created- Returns:
this
builder
-
timeToLive
Sets thetimeToLive
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
timeToLive
- how long the token is valid for- Returns:
this
builder
-
callback
Sets thecallback
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed. Anull
callback value indicates that the callback has been established out-of-band, via some other form of communication between the consumer and the service provider.- Parameters:
callback
- callback token attributes value- Returns:
this
builder
-
session
public ServiceProviderToken.ServiceProviderTokenBuilder session(ServiceProviderToken.Session session) Sets thesession
attribute of the token and returnsthis
builder to allow other optional attributes to be set or the final requestToken
instance to be constructed.- Parameters:
session
- the session- Returns:
this
builder
-
build
Constructs and returns the final requestToken
instance.- Specified by:
build
in classToken.TokenBuilder<ServiceProviderToken,
ServiceProviderToken.ServiceProviderTokenBuilder> - Returns:
- the final request
Token
instance
-