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
Modifier and TypeClassDescriptionstatic class
Token.TokenBuilder<T,
B extends Token.TokenBuilder<T, B>> Base builder that can be used byToken
subclasses to build token instances.protected static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Consumer
Returns theConsumer
that owns this token.Returns an immutable map of the tokens properties.final String
getProperty
(String property) Returns the value of the property, ornull
if the property doesn't exist.Returns the names of the properties for this token.final String
getToken()
Returns the token value used to identify this token in OAuth messages.final String
Returns the secret used by theConsumer
to establish ownership of a givenToken
.final boolean
hasProperty
(String property) Returnstrue
if this token contains the optional property,false
otherwise.final boolean
Returnstrue
if this is an access token,false
otherwise.final boolean
Returnstrue
if this is a request token,false
otherwise.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 theConsumer
to establish ownership of a givenToken
.- Returns:
- the secret used by the
Consumer
to establish ownership of a givenToken
-
getConsumer
Returns theConsumer
that owns this token.- Returns:
- the
Consumer
that owns this token
-
isRequestToken
public final boolean isRequestToken()Returnstrue
if this is a request token,false
otherwise.- Returns:
true
if this is a request token,false
otherwise.
-
isAccessToken
public final boolean isAccessToken()Returnstrue
if this is an access token,false
otherwise.- Returns:
true
if this is an access token,false
otherwise.
-
hasProperty
Returnstrue
if this token contains the optional property,false
otherwise.- Parameters:
property
- name of the property to check the token for- Returns:
true
if this token contains the optional property,false
otherwise.
-
getProperty
Returns the value of the property, ornull
if 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
null
if 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
-