interface FromOauthIdentityOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.FromOauthIdentityOptions |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#FromOauthIdentityOptions |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.FromOauthIdentityOptions |
Python | aws_cdk.aws_bedrock_agentcore_alpha.FromOauthIdentityOptions |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป FromOauthIdentityOptions |
OAuth scopes (and optional custom parameters) when binding an {@link IOAuth2CredentialProvider} to a gateway target.
Example
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
});
const oauth = agentcore.OAuth2CredentialProvider.usingGithub(this, "GhOAuth", {
oAuth2CredentialProviderName: "github-oauth",
clientId: "your-client-id",
clientSecret: cdk.SecretValue.unsafePlainText("your-client-secret"),
});
gateway.addMcpServerTarget("Mcp", {
gatewayTargetName: "mcp-server",
description: "MCP with GitHub OAuth",
endpoint: "https://my-mcp-server.example.com",
credentialProviderConfigurations: [
agentcore.GatewayCredentialProvider.fromOauthIdentity(oauth, {
scopes: ["read:user"],
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| scopes | string[] | OAuth scopes the gateway should request for this target. |
| custom | { [string]: string } | Additional OAuth parameters for the provider. |
scopes
Type:
string[]
OAuth scopes the gateway should request for this target.
customParameters?
Type:
{ [string]: string }
(optional, default: none)
Additional OAuth parameters for the provider.

.NET
Go
Java
Python
TypeScript (