OpenIdConnectConfig Struct
Configuration for OpenID Connect authorization in AppSync.
| Source | aws-appsync/lib/graphqlapi.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const openIdConnectConfig: appsync.OpenIdConnectConfig = {
oidcProvider: 'oidcProvider',
// the properties below are optional
clientId: 'clientId',
tokenExpiryFromAuth: 123,
tokenExpiryFromIssue: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
open_id_connect_config = appsync.OpenIdConnectConfig(
oidc_provider="oidcProvider",
# the properties below are optional
client_id="clientId",
token_expiry_from_auth=123,
token_expiry_from_issue=123
)
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.appsync.*;
OpenIdConnectConfig openIdConnectConfig = OpenIdConnectConfig.builder()
.oidcProvider("oidcProvider")
// the properties below are optional
.clientId("clientId")
.tokenExpiryFromAuth(123)
.tokenExpiryFromIssue(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var openIdConnectConfig = new OpenIdConnectConfig {
OidcProvider = "oidcProvider",
// the properties below are optional
ClientId = "clientId",
TokenExpiryFromAuth = 123,
TokenExpiryFromIssue = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
openIdConnectConfig := &OpenIdConnectConfig{
OidcProvider: jsii.String("oidcProvider"),
// the properties below are optional
ClientId: jsii.String("clientId"),
TokenExpiryFromAuth: jsii.Number(123),
TokenExpiryFromIssue: jsii.Number(123),
}
Properties
clientIdoptionalstringclient_idoptionalstrclientIdoptionalStringClientIdoptionalstringClientIdoptional*string #The client identifier of the Relying party at the OpenID identity provider.
Default: * (All)
A regular expression can be specified so AppSync can validate against multiple client identifiers at a time.
example
ts
- 'ABCD|CDEF' // where ABCD and CDEF are two different clientId
oidcProviderstringoidc_providerstroidcProviderStringOidcProviderstringOidcProvider*string required #The issuer for the OIDC configuration.
The issuer returned by discovery must exactly match the value of iss in the OIDC token.
tokenExpiryFromAuthoptionalnumbertoken_expiry_from_authoptionalint | floattokenExpiryFromAuthoptionalNumberTokenExpiryFromAuthoptionaldoubleTokenExpiryFromAuthoptional*float64 #The number of milliseconds an OIDC token is valid after being authenticated by OIDC provider.
Default: no validation
auth_time claim in OIDC token is required for this validation to work.
tokenExpiryFromIssueoptionalnumbertoken_expiry_from_issueoptionalint | floattokenExpiryFromIssueoptionalNumberTokenExpiryFromIssueoptionaldoubleTokenExpiryFromIssueoptional*float64 #The number of milliseconds an OIDC token is valid after being issued to a user.
Default: no validation
This validation uses iat claim of OIDC token.