Class ScanCredentialsHelper
- java.lang.Object
-
- io.jenkins.plugins.synopsys.security.scan.global.ScanCredentialsHelper
-
public class ScanCredentialsHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static com.cloudbees.plugins.credentials.CredentialsMatcher
API_TOKEN_CREDENTIALS
static Class<org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl>
API_TOKEN_CREDENTIALS_CLASS
static com.cloudbees.plugins.credentials.CredentialsMatcher
USERNAME_PASSWORD_CREDENTIALS
static Class<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
USERNAME_PASSWORD_CREDENTIALS_CLASS
-
Constructor Summary
Constructors Constructor Description ScanCredentialsHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
getApiTokenByCredentialsId(String credentialsId)
Optional<org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl>
getApiTokenCredentialsById(String credentialsId)
<T extends com.cloudbees.plugins.credentials.Credentials>
Optional<T>getCredentialsById(Class<T> credentialsType, String credentialsId)
Optional<String>
getPasswordByCredentialsId(String credentialsId)
Optional<String>
getUsernameByCredentialsId(String credentialsId)
Optional<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
getUsernamePasswordCredentialsById(String credentialsId)
-
-
-
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
-
-
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)
-
-