Class TokenCredential.Builder
java.lang.Object
io.helidon.security.providers.common.TokenCredential.Builder
- All Implemented Interfaces:
Builder<TokenCredential.Builder,
,TokenCredential> Supplier<TokenCredential>
- Enclosing class:
TokenCredential
public static final class TokenCredential.Builder
extends Object
implements Builder<TokenCredential.Builder,TokenCredential>
Fluent API builder for
TokenCredential
.-
Method Summary
Modifier and TypeMethodDescription<T,
U extends T>
TokenCredential.BuilderAdd a token instance (such as JWT instance).Add a token instance (such as JWT instance).build()
Build the instance from this builder.Time the token would expire.Issuer of the token.Time the token was issued.Set the token content (the actual string travelling on the network).
-
Method Details
-
token
Set the token content (the actual string travelling on the network).- Parameters:
token
- token value- Returns:
- updated builder instance
-
issueTime
Time the token was issued.- Parameters:
issueTime
- issue instant- Returns:
- updated builder instance
-
expTime
Time the token would expire.- Parameters:
expirationTime
- expiration instant- Returns:
- updated builder instance
-
issuer
Issuer of the token.- Parameters:
issuer
- issuer (such as accounts.google.com)- Returns:
- updated builder instance
-
addToken
Add a token instance (such as JWT instance). May contain more than one instance (e.g. for JWT, we may send both SignedJwt and Jwt).- Type Parameters:
T
- type of instanceU
- type of class to register instance by- Parameters:
tokenClass
- class we want to register the instance undertokenInstance
- instance- Returns:
- updated builder instance
-
addToken
Add a token instance (such as JWT instance). May contain more than one instance (e.g. for JWT, we may send both SignedJwt and Jwt). Object is registered under the class it provides throughObject.getClass()
.- Parameters:
token
- instance- Returns:
- updated builder instance
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<TokenCredential.Builder,
TokenCredential> - Returns:
- instance of the built type
-