Interface CustomJWTAuthorizerConfiguration.Builder

  • Method Details

    • discoveryUrl

      This URL is used to fetch OpenID Connect configuration or authorization server metadata for validating incoming tokens.

      Parameters:
      discoveryUrl - This URL is used to fetch OpenID Connect configuration or authorization server metadata for validating incoming tokens.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedAudience

      CustomJWTAuthorizerConfiguration.Builder allowedAudience(Collection<String> allowedAudience)

      Represents individual audience values that are validated in the incoming JWT token validation process.

      Parameters:
      allowedAudience - Represents individual audience values that are validated in the incoming JWT token validation process.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedAudience

      CustomJWTAuthorizerConfiguration.Builder allowedAudience(String... allowedAudience)

      Represents individual audience values that are validated in the incoming JWT token validation process.

      Parameters:
      allowedAudience - Represents individual audience values that are validated in the incoming JWT token validation process.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedClients

      Represents individual client IDs that are validated in the incoming JWT token validation process.

      Parameters:
      allowedClients - Represents individual client IDs that are validated in the incoming JWT token validation process.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedClients

      CustomJWTAuthorizerConfiguration.Builder allowedClients(String... allowedClients)

      Represents individual client IDs that are validated in the incoming JWT token validation process.

      Parameters:
      allowedClients - Represents individual client IDs that are validated in the incoming JWT token validation process.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedScopes

      An array of scopes that are allowed to access the token.

      Parameters:
      allowedScopes - An array of scopes that are allowed to access the token.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedScopes

      CustomJWTAuthorizerConfiguration.Builder allowedScopes(String... allowedScopes)

      An array of scopes that are allowed to access the token.

      Parameters:
      allowedScopes - An array of scopes that are allowed to access the token.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • advertisedScopeMapping

      CustomJWTAuthorizerConfiguration.Builder advertisedScopeMapping(Map<String,String> advertisedScopeMapping)

      A map that associates each scope in allowedScopes with a corresponding advertised scope value. The advertised scope appears in OAuth protected resource metadata and WWW-Authenticate response headers. Use this parameter when the scope that clients request from your identity provider differs from the scope in the validated token. Each key is a scope from allowedScopes that the service uses for token validation. Each value is the corresponding scope that the service advertises to clients. Scopes without a mapping entry appear unchanged to clients.

      Parameters:
      advertisedScopeMapping - A map that associates each scope in allowedScopes with a corresponding advertised scope value. The advertised scope appears in OAuth protected resource metadata and WWW-Authenticate response headers. Use this parameter when the scope that clients request from your identity provider differs from the scope in the validated token. Each key is a scope from allowedScopes that the service uses for token validation. Each value is the corresponding scope that the service advertises to clients. Scopes without a mapping entry appear unchanged to clients.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customClaims

      An array of objects that define a custom claim validation name, value, and operation

      Parameters:
      customClaims - An array of objects that define a custom claim validation name, value, and operation
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customClaims

      An array of objects that define a custom claim validation name, value, and operation

      Parameters:
      customClaims - An array of objects that define a custom claim validation name, value, and operation
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customClaims

      An array of objects that define a custom claim validation name, value, and operation

      This is a convenience method that creates an instance of the CustomClaimValidationType.Builder avoiding the need to create one manually via CustomClaimValidationType.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to customClaims(List<CustomClaimValidationType>).

      Parameters:
      customClaims - a consumer that will call methods on CustomClaimValidationType.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • privateEndpoint

      Sets the value of the PrivateEndpoint property for this object.
      Parameters:
      privateEndpoint - The new value for the PrivateEndpoint property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • privateEndpoint

      Sets the value of the PrivateEndpoint property for this object. This is a convenience method that creates an instance of the PrivateEndpoint.Builder avoiding the need to create one manually via PrivateEndpoint.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to privateEndpoint(PrivateEndpoint).

      Parameters:
      privateEndpoint - a consumer that will call methods on PrivateEndpoint.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • privateEndpointOverrides

      CustomJWTAuthorizerConfiguration.Builder privateEndpointOverrides(Collection<PrivateEndpointOverride> privateEndpointOverrides)

      The private endpoint overrides for the custom JWT authorizer configuration.

      Parameters:
      privateEndpointOverrides - The private endpoint overrides for the custom JWT authorizer configuration.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • privateEndpointOverrides

      CustomJWTAuthorizerConfiguration.Builder privateEndpointOverrides(PrivateEndpointOverride... privateEndpointOverrides)

      The private endpoint overrides for the custom JWT authorizer configuration.

      Parameters:
      privateEndpointOverrides - The private endpoint overrides for the custom JWT authorizer configuration.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • privateEndpointOverrides

      CustomJWTAuthorizerConfiguration.Builder privateEndpointOverrides(Consumer<PrivateEndpointOverride.Builder>... privateEndpointOverrides)

      The private endpoint overrides for the custom JWT authorizer configuration.

      This is a convenience method that creates an instance of the PrivateEndpointOverride.Builder avoiding the need to create one manually via PrivateEndpointOverride.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to privateEndpointOverrides(List<PrivateEndpointOverride>).

      Parameters:
      privateEndpointOverrides - a consumer that will call methods on PrivateEndpointOverride.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • allowedWorkloadConfiguration

      CustomJWTAuthorizerConfiguration.Builder allowedWorkloadConfiguration(AllowedWorkloadConfiguration allowedWorkloadConfiguration)

      The configuration that restricts which workloads in the request's identity chain are allowed to invoke the target, identified by their hosting environments and workload identities. At launch, this is supported only for AgentCore Runtime targets, and the allowed workloads are AgentCore Gateways.

      Parameters:
      allowedWorkloadConfiguration - The configuration that restricts which workloads in the request's identity chain are allowed to invoke the target, identified by their hosting environments and workload identities. At launch, this is supported only for AgentCore Runtime targets, and the allowed workloads are AgentCore Gateways.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedWorkloadConfiguration

      default CustomJWTAuthorizerConfiguration.Builder allowedWorkloadConfiguration(Consumer<AllowedWorkloadConfiguration.Builder> allowedWorkloadConfiguration)

      The configuration that restricts which workloads in the request's identity chain are allowed to invoke the target, identified by their hosting environments and workload identities. At launch, this is supported only for AgentCore Runtime targets, and the allowed workloads are AgentCore Gateways.

      This is a convenience method that creates an instance of the AllowedWorkloadConfiguration.Builder avoiding the need to create one manually via AllowedWorkloadConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to allowedWorkloadConfiguration(AllowedWorkloadConfiguration).

      Parameters:
      allowedWorkloadConfiguration - a consumer that will call methods on AllowedWorkloadConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: