Class TokenCredential.Builder
- java.lang.Object
- 
- io.helidon.security.providers.common.TokenCredential.Builder
 
- 
- All Implemented Interfaces:
- Builder<TokenCredential>,- Supplier<TokenCredential>
 - Enclosing class:
- TokenCredential
 
 public static final class TokenCredential.Builder extends Object implements Builder<TokenCredential> Fluent API builder forTokenCredential.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,U extends T>
 TokenCredential.BuilderaddToken(Class<T> tokenClass, U tokenInstance)Add a token instance (such as JWT instance).TokenCredential.BuilderaddToken(Object token)Add a token instance (such as JWT instance).TokenCredentialbuild()Build the instance from this builder.TokenCredential.BuilderexpTime(Instant expirationTime)Time the token would expire.TokenCredential.Builderissuer(String issuer)Issuer of the token.TokenCredential.BuilderissueTime(Instant issueTime)Time the token was issued.TokenCredential.Buildertoken(String token)Set the token content (the actual string travelling on the network).
 
- 
- 
- 
Method Detail- 
tokenpublic TokenCredential.Builder token(String token) Set the token content (the actual string travelling on the network).- Parameters:
- token- token value
- Returns:
- updated builder instance
 
 - 
issueTimepublic TokenCredential.Builder issueTime(Instant issueTime) Time the token was issued.- Parameters:
- issueTime- issue instant
- Returns:
- updated builder instance
 
 - 
expTimepublic TokenCredential.Builder expTime(Instant expirationTime) Time the token would expire.- Parameters:
- expirationTime- expiration instant
- Returns:
- updated builder instance
 
 - 
issuerpublic TokenCredential.Builder issuer(String issuer) Issuer of the token.- Parameters:
- issuer- issuer (such as accounts.google.com)
- Returns:
- updated builder instance
 
 - 
addTokenpublic <T,U extends T> TokenCredential.Builder addToken(Class<T> tokenClass, U tokenInstance) 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 instance
- U- type of class to register instance by
- Parameters:
- tokenClass- class we want to register the instance under
- tokenInstance- instance
- Returns:
- updated builder instance
 
 - 
addTokenpublic TokenCredential.Builder addToken(Object token) 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
 
 - 
buildpublic TokenCredential build() Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<TokenCredential>
- Returns:
- instance of the built type
 
 
- 
 
-