OAuth2 AC (Beta)
The beta_oauth2
block lets you configure the oauth2_authorization_url()
function and an access
control for an OAuth2 Authorization Code Grant Flow redirect endpoint.
Like all access control types, the beta_oauth2
block is defined in the definitions
block and can be referenced in all configuration blocks by its required label.
Block name | Context | Label |
---|---|---|
beta_oauth2 | Definitions Block | âš required |
A nested jwt_signing_profile
block is used to create a client assertion if token_endpoint_auth_method
is either "client_secret_jwt"
or "private_key_jwt"
.
Attributes
Name | Type | Default | Description |
---|---|---|---|
authorization_endpoint | string | - | The authorization server endpoint URL used for authorization. |
backend | string | - | References a backend in definitions for token requests. Mutually exclusive with |
client_id | string | - | The client identifier. |
client_secret | string | - | The client password. Required unless |
custom_log_fields | object | - | Log fields for custom logging. Inherited by nested blocks. |
grant_type | string | - | The grant type. Required, to be set to: |
redirect_uri | string | - | The Couper endpoint for receiving the authorization code. Relative URL references are resolved against the origin of the current request URL. The origin can be changed with the |
scope | string | - | A space separated list of requested scope values for the access token. |
token_endpoint | string | - | The authorization server endpoint URL used for requesting the token. |
token_endpoint_auth_method | string | "client_secret_basic" | Defines the method to authenticate the client at the token endpoint. If set to |
verifier_method | string | - | The method to verify the integrity of the authorization code flow. Available values: |
verifier_value | string | - | The value of the (unhashed) verifier. E.g. using cookie value created with |
If the authorization server supports the code_challenge_method
S256
(a.k.a. PKCE, see RFC 7636), we recommend verifier_method = "ccm_s256"
.
The HTTP header field Accept: application/json
is automatically added to the token request. This can be modified with request header modifiers in a backend block.
Nested Blocks
Name | Description |
---|---|
backend | Configures a backend for token requests (zero or one). Mutually exclusive with |
error_handler | Configures an error handler (zero or more). |
jwt_signing_profile | Configures a JWT signing profile to create a client assertion if |