Class AuthenticationTokenContext.Builder<T>
- java.lang.Object
-
- jenkins.authentication.tokens.api.AuthenticationTokenContext.Builder<T>
-
- Type Parameters:
T
- the token type.
- Enclosing class:
- AuthenticationTokenContext<T>
@NotThreadSafe public static final class AuthenticationTokenContext.Builder<T> extends Object
A non-thread safe builder ofAuthenticationTokenContext
instances.- Since:
- 1.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationTokenContext<T>
build()
Instantiates theAuthenticationTokenContext
.AuthenticationTokenContext.Builder<T>
with(Object purpose)
Specifies the supplied purpose (with valueBoolean.TRUE
).AuthenticationTokenContext.Builder<T>
with(Object purpose, Object value)
Specifies the supplied purpose with the specified value.
-
-
-
Method Detail
-
with
@NonNull public AuthenticationTokenContext.Builder<T> with(@NonNull Object purpose)
Specifies the supplied purpose (with valueBoolean.TRUE
).- Parameters:
purpose
- the purpose.- Returns:
this
for method chaining.
-
with
@NonNull public AuthenticationTokenContext.Builder<T> with(@NonNull Object purpose, @CheckForNull Object value)
Specifies the supplied purpose with the specified value.- Parameters:
purpose
- the purpose.value
- the value.- Returns:
this
for method chaining.
-
build
@NonNull public AuthenticationTokenContext<T> build()
Instantiates theAuthenticationTokenContext
.- Returns:
- the
AuthenticationTokenContext
.
-
-