interface GithubOAuth2CredentialProviderProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.GithubOAuth2CredentialProviderProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#GithubOAuth2CredentialProviderProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.GithubOAuth2CredentialProviderProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.GithubOAuth2CredentialProviderProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป GithubOAuth2CredentialProviderProps |
Implements
OAuth2, OAuth2, OAuth2
Props for {@link OAuth2CredentialProvider.usingGithub}.
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 |
|---|---|---|
| client | string | OAuth2 client identifier. |
| client | Secret | OAuth2 client secret. |
| o | string | Name of the credential provider. |
| tags? | { [string]: string } | Tags for this credential provider. |
clientId
Type:
string
OAuth2 client identifier.
clientSecret
Type:
Secret
OAuth2 client secret.
NOTE: The client secret will be included in the CloudFormation template as part of synthesis.
The service stores the secret in Secrets Manager after creation, but the value is visible
in the template and deployment history. Use SecretValue.unsafePlainText() to explicitly
acknowledge plaintext, or pass a reference from another construct to avoid embedding the
literal value.
oAuth2CredentialProviderName?
Type:
string
(optional, default: a name generated by CDK)
Name of the credential provider.
tags?
Type:
{ [string]: string }
(optional, default: no tags)
Tags for this credential provider.

.NET
Go
Java
Python
TypeScript (