# FromOauthIdentityOptions

OAuth scopes (and optional custom parameters) when binding an {@link IOAuth2CredentialProvider} to a gateway target.

Used as argument in: [GatewayCredentialProvider.fromOauthIdentity](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.GatewayCredentialProvider.html#fromoauthidentity)

- Source: [`lib/gateway/outbound-auth/credential-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/outbound-auth/credential-provider.ts#L81)

## Example

TypeScript:

```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';
const fromOauthIdentityOptions: bedrock_agentcore_alpha.FromOauthIdentityOptions = {
  scopes: ['scopes'],

  // the properties below are optional
  customParameters: {
    customParametersKey: 'customParameters',
  },
};
```

Python:

```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

from_oauth_identity_options = bedrock_agentcore_alpha.FromOauthIdentityOptions(
    scopes=["scopes"],

    # the properties below are optional
    custom_parameters={
        "custom_parameters_key": "customParameters"
    }
)
```

Java:

```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.*;

FromOauthIdentityOptions fromOauthIdentityOptions = FromOauthIdentityOptions.builder()
        .scopes(List.of("scopes"))

        // the properties below are optional
        .customParameters(Map.of(
                "customParametersKey", "customParameters"))
        .build();
```

C# / .NET:

```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;

var fromOauthIdentityOptions = new FromOauthIdentityOptions {
    Scopes = new [] { "scopes" },

    // the properties below are optional
    CustomParameters = new Dictionary<string, string> {
        { "customParametersKey", "customParameters" }
    }
};
```

Golang:

```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"

fromOauthIdentityOptions := &FromOauthIdentityOptions{
	Scopes: []*string{
		jsii.String("scopes"),
	},

	// the properties below are optional
	CustomParameters: map[string]*string{
		"customParametersKey": jsii.String("customParameters"),
	},
}
```

## Properties

- `customParameters`: { [key: string]: string } = none — Additional OAuth parameters for the provider.

- `scopes`: string[] (required) — OAuth scopes the gateway should request for this target.
