Class GoogleOAuthProvider
- java.lang.Object
-
- jetbrains.buildServer.serverSide.oauth.OAuthProvider
-
- jetbrains.buildServer.serverSide.oauth.google.GoogleOAuthProvider
-
- All Implemented Interfaces:
ConnectionProvider
,ServerExtension
,TeamCityExtension
public class GoogleOAuthProvider 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
TYPE
-
Fields inherited from class jetbrains.buildServer.serverSide.oauth.OAuthProvider
COMPOUND_STORAGE_ID_PREFIX, myCapabilityResolvers, NOPE
-
-
Constructor Summary
Constructors Constructor Description GoogleOAuthProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describeConnection(OAuthConnectionDescriptor connection)
Map<String,String>
getDefaultProperties()
String
getDisplayName()
String
getEditParametersUrl()
PropertiesProcessor
getPropertiesProcessor()
String
getTokenStorageId(OAuthConnectionDescriptor connection)
Returns an id of the token storage used by connection.Set<String>
getTokenStorageParameters()
Returns the parameters used when constructing the token storage ID for connections of this provider type.String
getType()
boolean
isAvailable()
-
Methods inherited from class jetbrains.buildServer.serverSide.oauth.OAuthProvider
applyAccessibleEntities, buildCompoundTokenStorageId, connectionHasCapability, connectionIsHidden, describeConnectionForUI, getAccessibleEntitiesEndpoint, getAdditionalUIConnectionDescription, getCapabilitiesUrl, getCapabilityResolver, getFallbackRedirectPath, getProviderTypeForUniqueRedirect, getScope, getScopeForIntent, getSupportedTokenIntentTypes, getTokenPopupPath, getTokenUsageParamsForVcsRoot, isAccessibleEntitiesSupported, isAcquiringTokenSupported, isAcquiringTokenSupportedForConnection, isCapabilitiesEnabledForProject, isCapabilitiesSupported, isSuitableToken, 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, getDisplayOrderRank, getTypeForUrl
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
@NotNull public String getType()
- Returns:
- String used to identify the Connection Provider type. All Connection features store this property in parameters.
-
getDisplayName
@NotNull public String getDisplayName()
- Returns:
- human friendly provider name
-
describeConnection
@NotNull public String describeConnection(@NotNull OAuthConnectionDescriptor connection)
- Overrides:
describeConnection
in classOAuthProvider
- Returns:
- human friendly description of OAuth connection
-
getTokenStorageId
@NotNull public String getTokenStorageId(@NotNull OAuthConnectionDescriptor connection)
Description copied from class:OAuthProvider
Returns an id of the token storage used by connection. Depending on the connection type multiple connections can use the same token storage. In case of OAuth2 apps, this id may be based on the client/application id of the OAuth2 app configured in a third party system.- Overrides:
getTokenStorageId
in classOAuthProvider
- Parameters:
connection
- descriptor- Returns:
- token storage id
-
getPropertiesProcessor
@Nullable public PropertiesProcessor getPropertiesProcessor()
- Specified by:
getPropertiesProcessor
in interfaceConnectionProvider
- Overrides:
getPropertiesProcessor
in classOAuthProvider
- Returns:
- processor for connection provider parameters. Properties processor performs validation function and is called when connection is edited or created.
-
getEditParametersUrl
@Nullable public String getEditParametersUrl()
- Specified by:
getEditParametersUrl
in interfaceConnectionProvider
- Overrides:
getEditParametersUrl
in classOAuthProvider
- Returns:
- URL to edit connection parameters page
-
getDefaultProperties
@Nullable public Map<String,String> getDefaultProperties()
- Specified by:
getDefaultProperties
in interfaceConnectionProvider
- Overrides:
getDefaultProperties
in classOAuthProvider
- Returns:
- all default parameters related to this ConnectionProvider. Defaults for all possible parameter names.
-
isAvailable
public boolean isAvailable()
- Specified by:
isAvailable
in interfaceConnectionProvider
- Overrides:
isAvailable
in classOAuthProvider
-
getTokenStorageParameters
@NotNull public Set<String> getTokenStorageParameters()
Description copied from class:OAuthProvider
Returns the parameters used when constructing the token storage ID for connections of this provider type. Implementors must make sure this corresponds with the implementation ofOAuthProvider.getTokenStorageId(OAuthConnectionDescriptor)
.- Overrides:
getTokenStorageParameters
in classOAuthProvider
- Returns:
- set of parameter names
- See Also:
OAuthProvider.getTokenStorageId(OAuthConnectionDescriptor)
-
-