Class Token
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.applink.oauth.Token
- Direct Known Subclasses:
ServiceProviderToken
Base type for OAuth tokens. This type should never be used directly. Instead, use the more specific
com.atlassian.oauth.serviceprovider.ServiceProviderToken
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classToken.TokenBuilder<T,B extends Token.TokenBuilder<T, B>> Base builder that can be used byTokensubclasses to build token instances.protected static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ConsumerReturns theConsumerthat owns this token.Returns an immutable map of the tokens properties.final StringgetProperty(String property) Returns the value of the property, ornullif the property doesn't exist.Returns the names of the properties for this token.final StringgetToken()Returns the token value used to identify this token in OAuth messages.final StringReturns the secret used by theConsumerto establish ownership of a givenToken.final booleanhasProperty(String property) Returnstrueif this token contains the optional property,falseotherwise.final booleanReturnstrueif this is an access token,falseotherwise.final booleanReturnstrueif this is a request token,falseotherwise.toString()
-
Constructor Details
-
Token
-
-
Method Details
-
getToken
Returns the token value used to identify this token in OAuth messages.- Returns:
- the token value used to identify this token in OAuth messages
-
getTokenSecret
Returns the secret used by theConsumerto establish ownership of a givenToken.- Returns:
- the secret used by the
Consumerto establish ownership of a givenToken
-
getConsumer
Returns theConsumerthat owns this token.- Returns:
- the
Consumerthat owns this token
-
isRequestToken
public final boolean isRequestToken()Returnstrueif this is a request token,falseotherwise.- Returns:
trueif this is a request token,falseotherwise.
-
isAccessToken
public final boolean isAccessToken()Returnstrueif this is an access token,falseotherwise.- Returns:
trueif this is an access token,falseotherwise.
-
hasProperty
Returnstrueif this token contains the optional property,falseotherwise.- Parameters:
property- name of the property to check the token for- Returns:
trueif this token contains the optional property,falseotherwise.
-
getProperty
Returns the value of the property, ornullif the property doesn't exist.- Parameters:
property- name of the property to whose value is to be returned- Returns:
- the value of the property, or
nullif the property doesn't exist
-
getPropertyNames
Returns the names of the properties for this token.- Returns:
- the names of the properties for this token
-
getProperties
Returns an immutable map of the tokens properties.- Returns:
- an immutable map of the tokens properties
-
toString
-