CustomOAuth2CredentialProviderProps Struct
Props for {@link OAuth2CredentialProvider.usingCustom}.
Set exactly one of {@link discoveryUrl} (OIDC discovery document) or {@link authorizationServerMetadata} (static OAuth2 server metadata). Do not pass both.
Example
agentcore.OAuth2CredentialProvider.usingCustom(this, "CustomOAuth", {
oAuth2CredentialProviderName: "custom-idp",
clientId: "your-client-id",
clientSecret: cdk.SecretValue.unsafePlainText("your-client-secret"),
discoveryUrl: "https://idp.example.com/.well-known/openid-configuration",
});
Properties
authorizationServerMetadataoptionalOAuth2AuthorizationServerMetadataauthorization_server_metadataoptionalOAuth2AuthorizationServerMetadataauthorizationServerMetadataoptionalOAuth2AuthorizationServerMetadataAuthorizationServerMetadataoptionalOAuth2AuthorizationServerMetadataAuthorizationServerMetadataoptionalOAuth2AuthorizationServerMetadata#Default: not used when {@link discoveryUrl } is set
clientSecretSecretValueclient_secretSecretValueclientSecretSecretValueClientSecretSecretValueClientSecretSecretValuerequired#notes
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.
discoveryUrloptionalstringdiscovery_urloptionalstrdiscoveryUrloptionalStringDiscoveryUrloptionalstringDiscoveryUrloptional*string#Default: not used when {@link authorizationServerMetadata } is set
oAuth2CredentialProviderNameoptionalstringo_auth2_credential_provider_nameoptionalstroAuth2CredentialProviderNameoptionalStringOAuth2CredentialProviderNameoptionalstringOAuth2CredentialProviderNameoptional*string#Default: a name generated by CDK
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#Default: no tags