Class GitHubAppCredentialsAdapter
java.lang.Object
org.jenkinsci.plugins.azurekeyvaultplugin.credentials.AzureKeyVaultCredentialsAdapter
org.jenkinsci.plugins.azurekeyvaultplugin.credentials.githubapp.GitHubAppCredentialsAdapter
- All Implemented Interfaces:
ExtensionPoint
@OptionalExtension(requirePlugins="github-branch-source")
public class GitHubAppCredentialsAdapter
extends AzureKeyVaultCredentialsAdapter
Builds
GitHubAppCredentials from an Azure Key Vault secret's tags.
Only registered when the optional github-branch-source plugin is installed. This must stay the only
class referencing that plugin: an always-loaded class doing so would fail with NoClassDefFoundError
when it is absent and take the whole provider down with it.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.cloudbees.plugins.credentials.common.IdCredentialsadapt(AzureKeyVaultSecretContext context) The private key (PKCS#8 PEM) is resolved eagerly becauseGitHubAppCredentialsreads its key field directly during token generation and cannot resolve it lazily.getType()Methods inherited from class org.jenkinsci.plugins.azurekeyvaultplugin.credentials.AzureKeyVaultCredentialsAdapter
forType
-
Constructor Details
-
GitHubAppCredentialsAdapter
public GitHubAppCredentialsAdapter()
-
-
Method Details
-
getType
- Specified by:
getTypein classAzureKeyVaultCredentialsAdapter- Returns:
- the value of the secret's
typetag this adapter handles, e.g.string
-
adapt
public com.cloudbees.plugins.credentials.common.IdCredentials adapt(@NonNull AzureKeyVaultSecretContext context) The private key (PKCS#8 PEM) is resolved eagerly becauseGitHubAppCredentialsreads its key field directly during token generation and cannot resolve it lazily.- Specified by:
adaptin classAzureKeyVaultCredentialsAdapter- Returns:
- the credential, or
nullif both theclientIDandappIDtags are blank.
-