IAppSyncAuthConfig
- class aws_cdk.aws_appsync.IAppSyncAuthConfig(*args, **kwargs)
Bases:
ProtocolExposes methods for defining authorization config for AppSync APIs.
Methods
- setup_cognito_config(*, user_pool, app_id_client_regex=None)
Set up Cognito Authorization configuration for AppSync APIs.
- Parameters:
user_pool (
IUserPool) – The Cognito user pool to use as identity source.app_id_client_regex (
Optional[str]) – the optional app id regex. Default: - None
- Return type:
Any
- setup_lambda_authorizer_config(*, handler, results_cache_ttl=None, validation_regex=None)
Set up Lambda Authorization configuration AppSync APIs.
- Parameters:
handler (
IFunction) – The authorizer lambda function.results_cache_ttl (
Optional[Duration]) – How long the results are cached. Disable caching by setting this to 0. Default: Duration.minutes(5)validation_regex (
Optional[str]) – A regular expression for validation of tokens before the Lambda function is called. Default: - no regex filter will be applied.
- Return type:
Any
- setup_open_id_connect_config(*, oidc_provider, client_id=None, token_expiry_from_auth=None, token_expiry_from_issue=None)
Set up OIDC Authorization configuration for AppSync APIs.
- Parameters:
oidc_provider (
str) – The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value ofissin the OIDC token.client_id (
Optional[str]) – The client identifier of the Relying party at the OpenID identity provider. A regular expression can be specified so AppSync can validate against multiple client identifiers at a time. Default: - - (All)token_expiry_from_auth (
Union[int,float,None]) – The number of milliseconds an OIDC token is valid after being authenticated by OIDC provider.auth_timeclaim in OIDC token is required for this validation to work. Default: - no validationtoken_expiry_from_issue (
Union[int,float,None]) – The number of milliseconds an OIDC token is valid after being issued to a user. This validation usesiatclaim of OIDC token. Default: - no validation
- Return type:
Any