# AuthenticateOidcConfigProperty

Specifies information required using an identity provide (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 authenticateOidcConfigProperty: elbv2.CfnListenerRule.AuthenticateOidcConfigProperty = {
  authorizationEndpoint: 'authorizationEndpoint',
  clientId: 'clientId',
  issuer: 'issuer',
  tokenEndpoint: 'tokenEndpoint',
  userInfoEndpoint: 'userInfoEndpoint',

  // the properties below are optional
  authenticationRequestExtraParams: {
    authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
  },
  clientSecret: 'clientSecret',
  onUnauthenticatedRequest: 'onUnauthenticatedRequest',
  scope: 'scope',
  sessionCookieName: 'sessionCookieName',
  sessionTimeout: 123,
  useExistingClientSecret: false,
};
```

Python:

```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_oidc_config_property = elbv2.CfnListenerRule.AuthenticateOidcConfigProperty(
    authorization_endpoint="authorizationEndpoint",
    client_id="clientId",
    issuer="issuer",
    token_endpoint="tokenEndpoint",
    user_info_endpoint="userInfoEndpoint",

    # the properties below are optional
    authentication_request_extra_params={
        "authentication_request_extra_params_key": "authenticationRequestExtraParams"
    },
    client_secret="clientSecret",
    on_unauthenticated_request="onUnauthenticatedRequest",
    scope="scope",
    session_cookie_name="sessionCookieName",
    session_timeout=123,
    use_existing_client_secret=False
)
```

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

AuthenticateOidcConfigProperty authenticateOidcConfigProperty = AuthenticateOidcConfigProperty.builder()
        .authorizationEndpoint("authorizationEndpoint")
        .clientId("clientId")
        .issuer("issuer")
        .tokenEndpoint("tokenEndpoint")
        .userInfoEndpoint("userInfoEndpoint")

        // the properties below are optional
        .authenticationRequestExtraParams(Map.of(
                "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams"))
        .clientSecret("clientSecret")
        .onUnauthenticatedRequest("onUnauthenticatedRequest")
        .scope("scope")
        .sessionCookieName("sessionCookieName")
        .sessionTimeout(123)
        .useExistingClientSecret(false)
        .build();
```

C# / .NET:

```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 authenticateOidcConfigProperty = new AuthenticateOidcConfigProperty {
    AuthorizationEndpoint = "authorizationEndpoint",
    ClientId = "clientId",
    Issuer = "issuer",
    TokenEndpoint = "tokenEndpoint",
    UserInfoEndpoint = "userInfoEndpoint",

    // the properties below are optional
    AuthenticationRequestExtraParams = new Dictionary<string, string> {
        { "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams" }
    },
    ClientSecret = "clientSecret",
    OnUnauthenticatedRequest = "onUnauthenticatedRequest",
    Scope = "scope",
    SessionCookieName = "sessionCookieName",
    SessionTimeout = 123,
    UseExistingClientSecret = false
};
```

Golang:

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

authenticateOidcConfigProperty := &AuthenticateOidcConfigProperty{
	AuthorizationEndpoint: jsii.String("authorizationEndpoint"),
	ClientId: jsii.String("clientId"),
	Issuer: jsii.String("issuer"),
	TokenEndpoint: jsii.String("tokenEndpoint"),
	UserInfoEndpoint: jsii.String("userInfoEndpoint"),

	// the properties below are optional
	AuthenticationRequestExtraParams: map[string]*string{
		"authenticationRequestExtraParamsKey": jsii.String("authenticationRequestExtraParams"),
	},
	ClientSecret: jsii.String("clientSecret"),
	OnUnauthenticatedRequest: jsii.String("onUnauthenticatedRequest"),
	Scope: jsii.String("scope"),
	SessionCookieName: jsii.String("sessionCookieName"),
	SessionTimeout: jsii.Number(123),
	UseExistingClientSecret: jsii.Boolean(false),
}
```

## Properties

- `authenticationRequestExtraParams`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — The query parameters (up to 10) to include in the redirect request to the authorization endpoint.

- `authorizationEndpoint`: string (required) — The authorization endpoint of the IdP.

  This must be a full URL, including the HTTPS protocol, the domain, and the path.

- `clientId`: string (required) — The OAuth 2.0 client identifier.

- `clientSecret`: string — The OAuth 2.0 client secret. This parameter is required if you are creating a rule. If you are modifying a rule, you can omit this parameter if you set `UseExistingClientSecret` to true.

- `issuer`: string (required) — The OIDC issuer identifier of the IdP.

  This must be a full URL, including the HTTPS protocol, the domain, and the path.

- `onUnauthenticatedRequest`: 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.

- `scope`: string — 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.

- `sessionCookieName`: string — The name of the cookie used to maintain session information.

  The default is AWSELBAuthSessionCookie.

- `sessionTimeout`: number — The maximum duration of the authentication session, in seconds.

  The default is 604800 seconds (7 days).

- `tokenEndpoint`: string (required) — The token endpoint of the IdP.

  This must be a full URL, including the HTTPS protocol, the domain, and the path.

- `useExistingClientSecret`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether to use the existing client secret when modifying a rule.

  If you are creating a rule, you can omit this parameter or set it to false.

- `userInfoEndpoint`: string (required) — The user info endpoint of the IdP.

  This must be a full URL, including the HTTPS protocol, the domain, and the path.
