Class ScanCredentialsHelper


  • public class ScanCredentialsHelper
    extends Object
    • Field Detail

      • API_TOKEN_CREDENTIALS_CLASS

        public static final Class<org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl> API_TOKEN_CREDENTIALS_CLASS
      • API_TOKEN_CREDENTIALS

        public static final com.cloudbees.plugins.credentials.CredentialsMatcher API_TOKEN_CREDENTIALS
      • USERNAME_PASSWORD_CREDENTIALS_CLASS

        public static final Class<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl> USERNAME_PASSWORD_CREDENTIALS_CLASS
      • USERNAME_PASSWORD_CREDENTIALS

        public static final com.cloudbees.plugins.credentials.CredentialsMatcher USERNAME_PASSWORD_CREDENTIALS
    • Constructor Detail

      • ScanCredentialsHelper

        public ScanCredentialsHelper()
    • Method Detail

      • getApiTokenByCredentialsId

        public Optional<String> getApiTokenByCredentialsId​(String credentialsId)
      • getUsernameByCredentialsId

        public Optional<String> getUsernameByCredentialsId​(String credentialsId)
      • getPasswordByCredentialsId

        public Optional<String> getPasswordByCredentialsId​(String credentialsId)
      • getUsernamePasswordCredentialsById

        public Optional<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl> getUsernamePasswordCredentialsById​(String credentialsId)
      • getApiTokenCredentialsById

        public Optional<org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl> getApiTokenCredentialsById​(String credentialsId)
      • getCredentialsById

        public <T extends com.cloudbees.plugins.credentials.Credentials> Optional<T> getCredentialsById​(Class<T> credentialsType,
                                                                                                        String credentialsId)