-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add token request hooks for all grant types (ory#3427)
Added a generic token hook that is called for all grant types and includes `payload` with a single allowed value - `assertion` to cover the `jwt-bearer` grant type customization. The existing `refresh token hook` is left unchanged and is considered to be deprecated in favor of the new hook logic. The `refresh token hook` will at some point be removed. Closes ory#3244 Closes ory/fosite#729
- Loading branch information
Showing
20 changed files
with
1,284 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
...ass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
...max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
..._authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
...ass_request_if_strategy_passes-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
...max_age_is_less_than_auth_time-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
..._authentication_time_is_recent-should_call_refresh_token_hook_if_configured-hook=new.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"session": { | ||
"id_token": { | ||
"id_token_claims": { | ||
"jti": "", | ||
"iss": "http://localhost:4444/", | ||
"sub": "foo", | ||
"aud": [ | ||
"app-client" | ||
], | ||
"nonce": "", | ||
"at_hash": "", | ||
"acr": "1", | ||
"amr": null, | ||
"c_hash": "", | ||
"ext": { | ||
"hooked": "legacy" | ||
} | ||
}, | ||
"headers": { | ||
"extra": { | ||
} | ||
}, | ||
"username": "", | ||
"subject": "foo" | ||
}, | ||
"extra": { | ||
"hooked": "legacy" | ||
}, | ||
"client_id": "app-client", | ||
"consent_challenge": "", | ||
"exclude_not_before_claim": false, | ||
"allowed_top_level_claims": [] | ||
}, | ||
"request": { | ||
"client_id": "app-client", | ||
"granted_scopes": [ | ||
"offline", | ||
"openid", | ||
"hydra.*" | ||
], | ||
"granted_audience": [], | ||
"grant_types": [ | ||
"refresh_token" | ||
], | ||
"payload": {} | ||
} | ||
} |
Oops, something went wrong.