Class GitHubOAuthProviderBase
- java.lang.Object
-
- jetbrains.buildServer.serverSide.oauth.OAuthProvider
-
- jetbrains.buildServer.serverSide.oauth.github.GitHubOAuthProviderBase
-
- All Implemented Interfaces:
ConnectionProvider
,ServerExtension
,TeamCityExtension
- Direct Known Subclasses:
GHEOAuthProvider
,GitHubOAuthProvider
public abstract class GitHubOAuthProviderBase extends OAuthProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jetbrains.buildServer.serverSide.oauth.OAuthProvider
OAuthProvider.CapabilityResolver
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SCOPE
-
Fields inherited from class jetbrains.buildServer.serverSide.oauth.OAuthProvider
COMPOUND_STORAGE_ID_PREFIX, myCapabilityResolvers, NOPE
-
-
Constructor Summary
Constructors Constructor Description GitHubOAuthProviderBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFallbackRedirectPath()
Returns the path to be included in redirect URLs.String
getScopeForIntent(OAuthConnectionDescriptor connection, TokenIntent intent)
Returns the provider-specific OAuth scope to request for the given token intent.Set<TokenIntentType>
getSupportedTokenIntentTypes()
Gets the token intent types this provider fully supports.boolean
isSuitableToken(OAuthToken token, TokenIntent intent)
-
Methods inherited from class jetbrains.buildServer.serverSide.oauth.OAuthProvider
applyAccessibleEntities, buildCompoundTokenStorageId, connectionHasCapability, connectionIsHidden, describeConnection, describeConnectionForUI, getAccessibleEntitiesEndpoint, getAdditionalUIConnectionDescription, getCapabilitiesUrl, getCapabilityResolver, getDefaultProperties, getEditParametersUrl, getPropertiesProcessor, getProviderTypeForUniqueRedirect, getScope, getTokenPopupPath, getTokenStorageId, getTokenStorageParameters, getTokenUsageParamsForVcsRoot, isAccessibleEntitiesSupported, isAcquiringTokenSupported, isAcquiringTokenSupportedForConnection, isAvailable, isCapabilitiesEnabledForProject, isCapabilitiesSupported, isTokenRefreshSupported, isUniqueRedirectsSupported, refreshToken, registerCapabilityResolver, testConnection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.connections.ConnectionProvider
describeConnection, getDisplayName, getDisplayOrderRank, getType, getTypeForUrl
-
-
-
-
Field Detail
-
DEFAULT_SCOPE
public static final String DEFAULT_SCOPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSuitableToken
public boolean isSuitableToken(@NotNull OAuthToken token, @NotNull TokenIntent intent)
- Overrides:
isSuitableToken
in classOAuthProvider
-
getScopeForIntent
@Nullable public String getScopeForIntent(@NotNull OAuthConnectionDescriptor connection, @NotNull TokenIntent intent)
Description copied from class:OAuthProvider
Returns the provider-specific OAuth scope to request for the given token intent.- Overrides:
getScopeForIntent
in classOAuthProvider
- Parameters:
connection
- the connection to be used for issuing the tokenintent
- the intended token usage- Returns:
- specific OAuth scope, if any
-
getFallbackRedirectPath
@Nullable public String getFallbackRedirectPath()
Description copied from class:OAuthProvider
Returns the path to be included in redirect URLs. Normally this should be the access token controller path. This will be used as a fallback if this provider does not support unique redirect URLs. This will be used as a fallback if a connection does not have a redirect ID parameter.- Overrides:
getFallbackRedirectPath
in classOAuthProvider
- Returns:
- a controller path starting with a slash
- See Also:
OAuthProvider.isUniqueRedirectsSupported()
-
getSupportedTokenIntentTypes
@NotNull public Set<TokenIntentType> getSupportedTokenIntentTypes()
Description copied from class:OAuthProvider
Gets the token intent types this provider fully supports. Full support means that the methodsOAuthProvider.getScopeForIntent(OAuthConnectionDescriptor, TokenIntent)
andOAuthProvider.isSuitableToken(OAuthToken, TokenIntent)
are implemented with sufficient logic to cater for the claimed token intent types.- Overrides:
getSupportedTokenIntentTypes
in classOAuthProvider
- Returns:
- set of supported token intent types
-
-