public final class AuthenticationTokens extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T,C extends com.cloudbees.plugins.credentials.Credentials> |
convert(AuthenticationTokenContext<T> context,
C... credentials)
Converts the best match of the supplied credentials into the specified token.
|
static <T,C extends com.cloudbees.plugins.credentials.Credentials> |
convert(AuthenticationTokenContext<T> context,
C credentials)
Converts the supplied credentials into the specified token.
|
static <T,C extends com.cloudbees.plugins.credentials.Credentials> |
convert(AuthenticationTokenContext<T> context,
List<C> credentials)
Converts the best match of the supplied credentials into the specified token.
|
static <T,C extends com.cloudbees.plugins.credentials.Credentials> |
convert(Class<T> type,
C credentials)
Converts the supplied credentials into the specified token.
|
static <T> com.cloudbees.plugins.credentials.CredentialsMatcher |
matcher(AuthenticationTokenContext<T> context)
Builds a matcher for credentials that can be converted into the supplied token type.
|
static <T> com.cloudbees.plugins.credentials.CredentialsMatcher |
matcher(Class<T> tokenClass)
Builds a matcher for credentials that can be converted into the supplied token type.
|
public static <T> com.cloudbees.plugins.credentials.CredentialsMatcher matcher(Class<T> tokenClass)
T - the type of tokentokenClass - the type of tokenpublic static <T> com.cloudbees.plugins.credentials.CredentialsMatcher matcher(AuthenticationTokenContext<T> context)
T - the type of token.context - the context that an authentication token is required in.@CheckForNull
public static <T,C extends com.cloudbees.plugins.credentials.Credentials> T convert(@NonNull
Class<T> type,
@CheckForNull
C credentials)
T - the type of token to convert to.C - the type of credentials to convert,type - the type of token to convert to.credentials - the credentials instance to convert.null if the credentials could not be converted.@CheckForNull
public static <T,C extends com.cloudbees.plugins.credentials.Credentials> T convert(@NonNull
AuthenticationTokenContext<T> context,
@CheckForNull
C credentials)
T - the type of token to convert to.C - the type of credentials to convert,context - the context that an authentication token is required in.credentials - the credentials instance to convert.null if the credentials could not be converted.@CheckForNull
public static <T,C extends com.cloudbees.plugins.credentials.Credentials> T convert(@NonNull
AuthenticationTokenContext<T> context,
@NonNull
C... credentials)
T - the type of token to convert to.C - the type of credentials to convert,context - the context that an authentication token is required in.credentials - the credentials instances to try and convert.null if the credentials could not be converted.@CheckForNull
public static <T,C extends com.cloudbees.plugins.credentials.Credentials> T convert(@NonNull
AuthenticationTokenContext<T> context,
@NonNull
List<C> credentials)
T - the type of token to convert to.C - the type of credentials to convert,context - the context that an authentication token is required in.credentials - the credentials instances to try and convert.null if the credentials could not be converted.Copyright © 2004-2015. All Rights Reserved.