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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceProviderToken.ServiceProviderTokenBuilderauthorizedBy(String user)Sets theuserthat authorized the request token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderTokenbuild()Constructs and returns the final requestTokeninstance.ServiceProviderToken.ServiceProviderTokenBuildercallback(URI callback)Sets thecallbackattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderToken.ServiceProviderTokenBuildercreationTime(long creationTime)Sets thecreationTimeattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderToken.ServiceProviderTokenBuilderdeniedBy(String user)Sets theuserthat denied the request token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderToken.ServiceProviderTokenBuildersession(ServiceProviderToken.Session session)Sets thesessionattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderToken.ServiceProviderTokenBuildertimeToLive(long timeToLive)Sets thetimeToLiveattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.ServiceProviderToken.ServiceProviderTokenBuilderverifier(String verifier)Sets theverifiervalue to use to determine that the authorizing user is the same as the user swapping the request token for an access token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- 
Methods inherited from class com.atlassian.bitbucket.jenkins.internal.applink.oauth.Token.TokenBuilder
consumer, properties, tokenSecret 
 - 
 
 - 
 
- 
- 
Method Detail
- 
authorizedBy
public ServiceProviderToken.ServiceProviderTokenBuilder authorizedBy(String user)
Sets theuserthat authorized the request token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- Parameters:
 user- name of the user that authorized theConsumerto make requests on behalf of themselves- Returns:
 thisbuilder
 
- 
deniedBy
public ServiceProviderToken.ServiceProviderTokenBuilder deniedBy(String user)
Sets theuserthat denied the request token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- Parameters:
 user- name of the user that denied theConsumerto make requests on behalf of themselves- Returns:
 thisbuilder
 
- 
verifier
public ServiceProviderToken.ServiceProviderTokenBuilder verifier(String verifier)
Sets theverifiervalue to use to determine that the authorizing user is the same as the user swapping the request token for an access token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance 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:
 thisbuilder
 
- 
creationTime
public ServiceProviderToken.ServiceProviderTokenBuilder creationTime(long creationTime)
Sets thecreationTimeattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- Parameters:
 creationTime- time the token was originally created- Returns:
 thisbuilder
 
- 
timeToLive
public ServiceProviderToken.ServiceProviderTokenBuilder timeToLive(long timeToLive)
Sets thetimeToLiveattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- Parameters:
 timeToLive- how long the token is valid for- Returns:
 thisbuilder
 
- 
callback
public ServiceProviderToken.ServiceProviderTokenBuilder callback(@Nullable URI callback)
Sets thecallbackattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed. Anullcallback 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:
 thisbuilder
 
- 
session
public ServiceProviderToken.ServiceProviderTokenBuilder session(ServiceProviderToken.Session session)
Sets thesessionattribute of the token and returnsthisbuilder to allow other optional attributes to be set or the final requestTokeninstance to be constructed.- Parameters:
 session- the session- Returns:
 thisbuilder
 
- 
build
public ServiceProviderToken build()
Constructs and returns the final requestTokeninstance.- Specified by:
 buildin classToken.TokenBuilder<ServiceProviderToken,ServiceProviderToken.ServiceProviderTokenBuilder>- Returns:
 - the final request 
Tokeninstance 
 
 - 
 
 -