CustomJwtAuthorizer Class
Custom JWT authorizer configuration implementation.
| Source | lib/gateway/inbound-auth/authorizer.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
declare const gatewayCustomClaim: bedrock_agentcore_alpha.GatewayCustomClaim;
const customJwtAuthorizer = new bedrock_agentcore_alpha.CustomJwtAuthorizer({
discoveryUrl: 'discoveryUrl',
// the properties below are optional
allowedAudience: ['allowedAudience'],
allowedClients: ['allowedClients'],
allowedScopes: ['allowedScopes'],
customClaims: [gatewayCustomClaim],
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
# gateway_custom_claim: bedrock_agentcore_alpha.GatewayCustomClaim
custom_jwt_authorizer = bedrock_agentcore_alpha.CustomJwtAuthorizer(
discovery_url="discoveryUrl",
# the properties below are optional
allowed_audience=["allowedAudience"],
allowed_clients=["allowedClients"],
allowed_scopes=["allowedScopes"],
custom_claims=[gateway_custom_claim]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;
GatewayCustomClaim gatewayCustomClaim;
CustomJwtAuthorizer customJwtAuthorizer = CustomJwtAuthorizer.Builder.create()
.discoveryUrl("discoveryUrl")
// the properties below are optional
.allowedAudience(List.of("allowedAudience"))
.allowedClients(List.of("allowedClients"))
.allowedScopes(List.of("allowedScopes"))
.customClaims(List.of(gatewayCustomClaim))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
GatewayCustomClaim gatewayCustomClaim;
var customJwtAuthorizer = new CustomJwtAuthorizer(new CustomJwtConfiguration {
DiscoveryUrl = "discoveryUrl",
// the properties below are optional
AllowedAudience = new [] { "allowedAudience" },
AllowedClients = new [] { "allowedClients" },
AllowedScopes = new [] { "allowedScopes" },
CustomClaims = new [] { gatewayCustomClaim }
});
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
var gatewayCustomClaim GatewayCustomClaim
customJwtAuthorizer := bedrock_agentcore_alpha.NewCustomJwtAuthorizer(&CustomJwtConfiguration{
DiscoveryUrl: jsii.String("discoveryUrl"),
// the properties below are optional
AllowedAudience: []*string{
jsii.String("allowedAudience"),
},
AllowedClients: []*string{
jsii.String("allowedClients"),
},
AllowedScopes: []*string{
jsii.String("allowedScopes"),
},
CustomClaims: []GatewayCustomClaim{
gatewayCustomClaim,
},
})
Initializer
ts
new CustomJwtAuthorizer(config: CustomJwtConfiguration)
python
CustomJwtAuthorizer(config: CustomJwtConfiguration)
java
new CustomJwtAuthorizer(CustomJwtConfiguration config)
csharp
new CustomJwtAuthorizer(CustomJwtConfiguration config)
go
NewCustomJwtAuthorizer(Config CustomJwtConfiguration)
Properties
authorizerTypeGatewayAuthorizerTypeauthorizer_typeGatewayAuthorizerTypeauthorizerTypeGatewayAuthorizerTypeAuthorizerTypeGatewayAuthorizerTypeAuthorizerTypeGatewayAuthorizerType #The authorizer type.