AuthenticateCognitoConfigProperty Struct
Specifies information required when integrating with Amazon Cognito to authenticate users.
| Source | |
|---|---|
| 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_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const authenticateCognitoConfigProperty: elbv2.CfnListenerRule.AuthenticateCognitoConfigProperty = {
userPoolArn: 'userPoolArn',
userPoolClientId: 'userPoolClientId',
userPoolDomain: 'userPoolDomain',
// the properties below are optional
authenticationRequestExtraParams: {
authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
},
onUnauthenticatedRequest: 'onUnauthenticatedRequest',
scope: 'scope',
sessionCookieName: 'sessionCookieName',
sessionTimeout: 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_elasticloadbalancingv2 as elbv2
authenticate_cognito_config_property = elbv2.CfnListenerRule.AuthenticateCognitoConfigProperty(
user_pool_arn="userPoolArn",
user_pool_client_id="userPoolClientId",
user_pool_domain="userPoolDomain",
# the properties below are optional
authentication_request_extra_params={
"authentication_request_extra_params_key": "authenticationRequestExtraParams"
},
on_unauthenticated_request="onUnauthenticatedRequest",
scope="scope",
session_cookie_name="sessionCookieName",
session_timeout=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.elasticloadbalancingv2.*;
AuthenticateCognitoConfigProperty authenticateCognitoConfigProperty = AuthenticateCognitoConfigProperty.builder()
.userPoolArn("userPoolArn")
.userPoolClientId("userPoolClientId")
.userPoolDomain("userPoolDomain")
// the properties below are optional
.authenticationRequestExtraParams(Map.of(
"authenticationRequestExtraParamsKey", "authenticationRequestExtraParams"))
.onUnauthenticatedRequest("onUnauthenticatedRequest")
.scope("scope")
.sessionCookieName("sessionCookieName")
.sessionTimeout(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.ElasticLoadBalancingV2;
var authenticateCognitoConfigProperty = new AuthenticateCognitoConfigProperty {
UserPoolArn = "userPoolArn",
UserPoolClientId = "userPoolClientId",
UserPoolDomain = "userPoolDomain",
// the properties below are optional
AuthenticationRequestExtraParams = new Dictionary<string, string> {
{ "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams" }
},
OnUnauthenticatedRequest = "onUnauthenticatedRequest",
Scope = "scope",
SessionCookieName = "sessionCookieName",
SessionTimeout = 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"
authenticateCognitoConfigProperty := &AuthenticateCognitoConfigProperty{
UserPoolArn: jsii.String("userPoolArn"),
UserPoolClientId: jsii.String("userPoolClientId"),
UserPoolDomain: jsii.String("userPoolDomain"),
// the properties below are optional
AuthenticationRequestExtraParams: map[string]*string{
"authenticationRequestExtraParamsKey": jsii.String("authenticationRequestExtraParams"),
},
OnUnauthenticatedRequest: jsii.String("onUnauthenticatedRequest"),
Scope: jsii.String("scope"),
SessionCookieName: jsii.String("sessionCookieName"),
SessionTimeout: jsii.Number(123),
}
Properties
authenticationRequestExtraParamsoptionalIResolvable | { [key: string]: string }authentication_request_extra_paramsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]authenticationRequestExtraParamsoptionalIResolvableAuthenticationRequestExtraParamsoptionalIResolvableAuthenticationRequestExtraParamsoptionalinterface{} #The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
onUnauthenticatedRequestoptionalstringon_unauthenticated_requestoptionalstronUnauthenticatedRequestoptionalStringOnUnauthenticatedRequestoptionalstringOnUnauthenticatedRequestoptional*string #The behavior if the user is not authenticated. The following are possible values:.
- deny `` - Return an HTTP 401 Unauthorized error.
- allow `` - Allow the request to be forwarded to the target.
- authenticate `` - Redirect the request to the IdP authorization endpoint. This is the default value.
The set of user claims to be requested from the IdP. The default is `openid` .
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
sessionCookieNameoptionalstringsession_cookie_nameoptionalstrsessionCookieNameoptionalStringSessionCookieNameoptionalstringSessionCookieNameoptional*string #The name of the cookie used to maintain session information.
The default is AWSELBAuthSessionCookie.
sessionTimeoutoptionalnumbersession_timeoutoptionalint | floatsessionTimeoutoptionalNumberSessionTimeoutoptionaldoubleSessionTimeoutoptional*float64 #The maximum duration of the authentication session, in seconds.
The default is 604800 seconds (7 days).
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
userPoolClientIdstringuser_pool_client_idstruserPoolClientIdStringUserPoolClientIdstringUserPoolClientId*string required #The ID of the Amazon Cognito user pool client.
userPoolDomainstringuser_pool_domainstruserPoolDomainStringUserPoolDomainstringUserPoolDomain*string required #The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.