Class Token
- java.lang.Object
- 
- com.atlassian.bitbucket.jenkins.internal.applink.oauth.Token
 
- 
- Direct Known Subclasses:
- ServiceProviderToken
 
 public abstract class Token extends Object Base type for OAuth tokens. This type should never be used directly. Instead, use the more specific com.atlassian.oauth.serviceprovider.ServiceProviderToken
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classToken.TokenBuilder<T,B extends Token.TokenBuilder<T,B>>Base builder that can be used byTokensubclasses to build token instances.protected static classToken.Type
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedToken(Token.TokenBuilder<?,?> builder)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ConsumergetConsumer()Returns theConsumerthat owns this token.Map<String,String>getProperties()Returns an immutable map of the tokens properties.StringgetProperty(String property)Returns the value of the property, ornullif the property doesn't exist.Iterable<String>getPropertyNames()Returns the names of the properties for this token.StringgetToken()Returns the token value used to identify this token in OAuth messages.StringgetTokenSecret()Returns the secret used by theConsumerto establish ownership of a givenToken.booleanhasProperty(String property)Returnstrueif this token contains the optional property,falseotherwise.booleanisAccessToken()Returnstrueif this is an access token,falseotherwise.booleanisRequestToken()Returnstrueif this is a request token,falseotherwise.StringtoString()
 
- 
- 
- 
Constructor Detail- 
Tokenprotected Token(Token.TokenBuilder<?,?> builder) 
 
- 
 - 
Method Detail- 
getTokenpublic final String 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
 
 - 
getTokenSecretpublic final String getTokenSecret() Returns the secret used by theConsumerto establish ownership of a givenToken.- Returns:
- the secret used by the Consumerto establish ownership of a givenToken
 
 - 
getConsumerpublic final Consumer getConsumer() Returns theConsumerthat owns this token.- Returns:
- the Consumerthat owns this token
 
 - 
isRequestTokenpublic final boolean isRequestToken() Returnstrueif this is a request token,falseotherwise.- Returns:
- trueif this is a request token,- falseotherwise.
 
 - 
isAccessTokenpublic final boolean isAccessToken() Returnstrueif this is an access token,falseotherwise.- Returns:
- trueif this is an access token,- falseotherwise.
 
 - 
hasPropertypublic final boolean hasProperty(String property) 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.
 
 - 
getPropertypublic final String getProperty(String property) 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
 
 - 
getPropertyNamespublic final Iterable<String> getPropertyNames() Returns the names of the properties for this token.- Returns:
- the names of the properties for this token
 
 - 
getPropertiespublic final Map<String,String> getProperties() Returns an immutable map of the tokens properties.- Returns:
- an immutable map of the tokens properties
 
 
- 
 
-