Package org.cdk8s.plus25.k8s
Class TokenRequestSpec.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.TokenRequestSpec.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TokenRequestSpec>
- Enclosing interface:
- TokenRequestSpec
@Stability(Stable) public static final class TokenRequestSpec.Builder extends Object implements software.amazon.jsii.Builder<TokenRequestSpec>
A builder forTokenRequestSpec
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRequestSpec.Builderaudiences(List<String> audiences)Sets the value ofTokenRequestSpec.getAudiences()TokenRequestSpec.BuilderboundObjectRef(BoundObjectReference boundObjectRef)Sets the value ofTokenRequestSpec.getBoundObjectRef()TokenRequestSpecbuild()Builds the configured instance.TokenRequestSpec.BuilderexpirationSeconds(Number expirationSeconds)Sets the value ofTokenRequestSpec.getExpirationSeconds()
-
-
-
Method Detail
-
audiences
@Stability(Stable) public TokenRequestSpec.Builder audiences(List<String> audiences)
Sets the value ofTokenRequestSpec.getAudiences()- Parameters:
audiences- Audiences are the intendend audiences of the token. This parameter is required. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.- Returns:
this
-
boundObjectRef
@Stability(Stable) public TokenRequestSpec.Builder boundObjectRef(BoundObjectReference boundObjectRef)
Sets the value ofTokenRequestSpec.getBoundObjectRef()- Parameters:
boundObjectRef- BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.- Returns:
this
-
expirationSeconds
@Stability(Stable) public TokenRequestSpec.Builder expirationSeconds(Number expirationSeconds)
Sets the value ofTokenRequestSpec.getExpirationSeconds()- Parameters:
expirationSeconds- ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.- Returns:
this
-
build
@Stability(Stable) public TokenRequestSpec build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TokenRequestSpec>- Returns:
- a new instance of
TokenRequestSpec - Throws:
NullPointerException- if any required attribute was not provided
-
-