fancy-toddler-44820
08/29/2024, 6:53 AMsteep-lamp-91158
fancy-toddler-44820
08/30/2024, 12:28 AMgorgeous-jackal-95562
08/30/2024, 7:22 AMhydra-cli
last time using OAuth client_id and credentials.
hydra perform client-credentials --client-id "$code_client_id" --client-secret "$code_client_secret" --scope "openid offline_access"
vs
hydra perform client-credentials --client-id "$code_client_id" --client-secret "$code_client_secret" --scope "openid offline_access new_scope_1 new_scope_2"
However, we wish to achieve the same for user token without using client-credentials and via the token exchange mechanism.steep-lamp-91158
gorgeous-jackal-95562
08/30/2024, 7:53 AMA custom consent UI can set arbitrary claims (server-side), including e.g. results from permission checks with Keto.Thanks for your reply, Patrik. We’re considering how best to manage claims and permissions within our product while using Ory’s tools. Specifically, we want to avoid showing our users a consent form each time there’s a change to the claims, as this could create a poor user experience.
A webhook can also set arbitrary claims on token issuance and refresh, including e.g. results from permission checks with Keto.This seems like a more suitable approach for our use case. Before moving forward, I want to make sure I understand this correctly. We’ve made two key decisions that align with our product goals: • We will use Ory’s login UI instead of creating a custom UI to streamline the login experience. • We do not plan to show additional consent forms to users when arbitrary scopes are added by us. With that in mind, here’s how I understand the process: 1. The user logs in, and we receive a user token. 2. We use the JWT token to call our backend APIs. 3. We perform permission checks with Ory Keto and add the necessary arbitrary scopes. 4. We set the arbitrary claims and issue a new token via a webhook. 5. The new token includes all the updated claims. Is this understanding correct?
steep-lamp-91158
Before the token is issued to the client, Ory will call your HTTPS endpoint with information about the OAuth client requesting the token.
Your endpoint's response to the webhook will be used to customize the token that Ory issues to the OAuth client, and optionally overwrite the session data stored for the resource owner.
gorgeous-jackal-95562
08/30/2024, 8:05 AMfancy-toddler-44820
09/02/2024, 6:50 AMsteep-lamp-91158