Skip to content

Commit 4f65365

Browse files
authored
feat: allow skipping consent for trusted clients (#3451)
This adds a new boolean parameter `skip_consent` to the admin APIs of the OAuth clients. This parameter will be forwarded to the consent app as `client.skip_consent`. It is up to the consent app to act on this parameter, but the canonical implementation accepts the consent on the user's behalf, similar to when `skip` is set.
1 parent 023167d commit 4f65365

File tree

58 files changed

+452
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+452
-37
lines changed

client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"token_endpoint_auth_method": "client_secret_basic",
2121
"userinfo_signed_response_alg": "none",
2222
"metadata": {},
23+
"skip_consent": false,
2324
"authorization_code_grant_access_token_lifespan": null,
2425
"authorization_code_grant_id_token_lifespan": null,
2526
"authorization_code_grant_refresh_token_lifespan": null,

client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"metadata": {
2424
"foo": "bar"
2525
},
26+
"skip_consent": false,
2627
"authorization_code_grant_access_token_lifespan": null,
2728
"authorization_code_grant_id_token_lifespan": null,
2829
"authorization_code_grant_refresh_token_lifespan": null,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"error": "invalid_client_metadata",
3-
"error_description": "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata. metadata cannot be set for dynamic client registration'"
3+
"error_description": "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata. 'metadata' cannot be set for dynamic client registration"
44
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"error": "invalid_request",
3+
"error_description": "'skip_consent' cannot be set for dynamic client registration"
4+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"client_name": "",
3+
"client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM",
4+
"redirect_uris": [
5+
"http://localhost:3000/cb"
6+
],
7+
"grant_types": null,
8+
"response_types": null,
9+
"scope": "offline_access offline openid",
10+
"audience": [],
11+
"owner": "",
12+
"policy_uri": "",
13+
"allowed_cors_origins": [],
14+
"tos_uri": "",
15+
"client_uri": "",
16+
"logo_uri": "",
17+
"contacts": null,
18+
"client_secret_expires_at": 0,
19+
"subject_type": "public",
20+
"jwks": {},
21+
"token_endpoint_auth_method": "client_secret_basic",
22+
"userinfo_signed_response_alg": "none",
23+
"metadata": {},
24+
"skip_consent": true,
25+
"authorization_code_grant_access_token_lifespan": null,
26+
"authorization_code_grant_id_token_lifespan": null,
27+
"authorization_code_grant_refresh_token_lifespan": null,
28+
"client_credentials_grant_access_token_lifespan": null,
29+
"implicit_grant_access_token_lifespan": null,
30+
"implicit_grant_id_token_lifespan": null,
31+
"jwt_bearer_grant_access_token_lifespan": null,
32+
"refresh_token_grant_id_token_lifespan": null,
33+
"refresh_token_grant_access_token_lifespan": null,
34+
"refresh_token_grant_refresh_token_lifespan": null
35+
}
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"token_endpoint_auth_method": "client_secret_basic",
2222
"userinfo_signed_response_alg": "none",
2323
"metadata": {},
24+
"skip_consent": false,
2425
"authorization_code_grant_access_token_lifespan": null,
2526
"authorization_code_grant_id_token_lifespan": null,
2627
"authorization_code_grant_refresh_token_lifespan": null,

client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"token_endpoint_auth_method": "client_secret_basic",
2222
"userinfo_signed_response_alg": "none",
2323
"metadata": {},
24+
"skip_consent": false,
2425
"authorization_code_grant_access_token_lifespan": null,
2526
"authorization_code_grant_id_token_lifespan": null,
2627
"authorization_code_grant_refresh_token_lifespan": null,

client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"jwks": {},
2121
"token_endpoint_auth_method": "client_secret_basic",
2222
"userinfo_signed_response_alg": "none",
23+
"skip_consent": false,
2324
"authorization_code_grant_access_token_lifespan": null,
2425
"authorization_code_grant_id_token_lifespan": null,
2526
"authorization_code_grant_refresh_token_lifespan": null,

client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"token_endpoint_auth_method": "client_secret_basic",
2222
"userinfo_signed_response_alg": "none",
2323
"metadata": {},
24+
"skip_consent": false,
2425
"authorization_code_grant_access_token_lifespan": "31h0m0s",
2526
"authorization_code_grant_id_token_lifespan": "32h0m0s",
2627
"authorization_code_grant_refresh_token_lifespan": "33h0m0s",

0 commit comments

Comments
 (0)