Interface GoogleOAuth2Credentials
-
- All Superinterfaces:
com.cloudbees.plugins.credentials.Credentials
,Describable<com.cloudbees.plugins.credentials.Credentials>
,ExtensionPoint
,com.cloudbees.plugins.credentials.common.IdCredentials
,com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials<GoogleOAuth2ScopeRequirement>
,Serializable
,com.cloudbees.plugins.credentials.common.StandardCredentials
,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials
,com.google.jenkins.plugins.credentials.oauth.StandardUsernameOAuth2Credentials<GoogleOAuth2ScopeRequirement>
,com.cloudbees.plugins.credentials.common.UsernameCredentials
- All Known Implementing Classes:
GoogleRobotCredentials
,GoogleRobotMetadataCredentials
,GoogleRobotPrivateKeyCredentials
public interface GoogleOAuth2Credentials extends com.google.jenkins.plugins.credentials.oauth.StandardUsernameOAuth2Credentials<GoogleOAuth2ScopeRequirement>
Google-specific username / access token combination.Implementations surface an API for obtaining the Google-standard
Credential
object for interacting with OAuth2 APIs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.api.client.auth.oauth2.Credential
getGoogleCredential(GoogleOAuth2ScopeRequirement requirement)
Fetches a Credential for the set of OAuth 2.0 scopes required.-
Methods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScope
-
Methods inherited from interface com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials
getAccessToken
-
-
-
-
Method Detail
-
getGoogleCredential
com.google.api.client.auth.oauth2.Credential getGoogleCredential(GoogleOAuth2ScopeRequirement requirement) throws GeneralSecurityException
Fetches a Credential for the set of OAuth 2.0 scopes required.- Parameters:
requirement
- The set of required OAuth 2.0 scopes- Returns:
- The Credential authorizing usage of the API scopes
- Throws:
GeneralSecurityException
- when the authentication fails
-
-