public class CredentialsUtil extends Object
Constructor and Description |
---|
CredentialsUtil() |
Modifier and Type | Method and Description |
---|---|
static <C extends com.cloudbees.plugins.credentials.Credentials> |
aioScopedCredentialsFor(String credentialsId,
Class<C> type)
Look up a Credential object from the stores, using the specified Id.
|
static Optional<Secret> |
clientSecretFor(String credentialsId)
Find the Client Secret for the specified credential id.
|
static <C extends com.cloudbees.plugins.credentials.Credentials> |
credentialsFor(String credentialsId,
Class<C> type)
Look up a Credential object from the stores, using the specified Id.
|
static Optional<Secret> |
privateKeyFor(String credentialsId)
Find the Private Key for the specified credential id.
|
@Nonnull public static Optional<Secret> clientSecretFor(String credentialsId)
credentialsId
- the id of the credentials@Nonnull public static Optional<Secret> privateKeyFor(String credentialsId)
credentialsId
- the id of the credentials@Nonnull public static <C extends com.cloudbees.plugins.credentials.Credentials> Optional<C> credentialsFor(String credentialsId, Class<C> type)
C
- which type of credentials to lookup.credentialsId
- the id of the credentialtype
- the type of the credential to lookup.@Nonnull public static <C extends com.cloudbees.plugins.credentials.Credentials> Optional<C> aioScopedCredentialsFor(String credentialsId, Class<C> type)
C
- which type of credentials to lookup.credentialsId
- the id of the credentialtype
- the type of the credential to lookup.Copyright © 2020–2021 Adobe Inc. All rights reserved.