Class GitLabCredentialConverter
java.lang.Object
com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
io.jenkins.plugins.gitlabcredentialsk8s.GitLabCredentialConverter
- All Implemented Interfaces:
ExtensionPoint
@Extension
public class GitLabCredentialConverter
extends com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
SecretToCredentialConverter that converts
PersonalAccessTokenImpl
.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Convert a String representation of the base64 encoded bytes of a UTF-8 String back to a String.boolean
canConvert
(String type) io.jenkins.plugins.gitlabserverconfig.credentials.PersonalAccessTokenImpl
convert
(io.fabric8.kubernetes.api.model.Secret secret) Methods inherited from class com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
all
-
Constructor Details
-
GitLabCredentialConverter
public GitLabCredentialConverter()
-
-
Method Details
-
canConvert
- Specified by:
canConvert
in classcom.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
-
convert
public io.jenkins.plugins.gitlabserverconfig.credentials.PersonalAccessTokenImpl convert(io.fabric8.kubernetes.api.model.Secret secret) throws com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.CredentialsConvertionException - Specified by:
convert
in classcom.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
- Throws:
com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.CredentialsConvertionException
-
base64DecodeToString
Convert a String representation of the base64 encoded bytes of a UTF-8 String back to a String.- Parameters:
s
- the base64 encoded String representation of the bytes.- Returns:
- the String or
null
if the string could not be converted.
-