-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to pick different claim for Jitsi Meet User Name #19
Comments
Hi @Viajaz, There are a lot of options for the token payload and it is not very flexible to cover all options by using environment variables in my opinion. Therefore I put this code block in a seperate file (context.ts) to allow customizations by editing its codes. You may edit this file as you wish. If you run jitsi-keycloak-adapter in a container environment, you may mount your customized |
Well, the idea would be to specify the name of the claim in said environmental variable (eg: Maybe something like: config.ts export const KEYCLOAK_NAME_CLAIM= Deno.env.get("KEYCLOAK_NAME_CLAIM") || "preferred_username"; context.ts // appropriate imports for config
// ...
name: userInfo[KEYCLOAK_NAME_CLAIM] || "preferred_username"
// ... |
Hi @Viajaz, I tested your suggestion and it works but I still want to keep Best regards |
That's a shame to hear, optional features that can be ignored shouldn't add complexity for simple use-cases and, for those that do need this functionality, overriding context.ts creates more fragility and overhead which creates complexity. I would also think that using environment variables is more simple for simple-use cases than someone changing a TypeScript file. If I have this setup with Watchtower or other autoupdate mechanism, and the core structure of context.ts changes in the future, it'll break the container, the use of environmental variables is a much nicer and cleaner interface between configuration and the app. |
Is your feature request related to a problem? Please describe.
Cannot change the default Jitsi Meet meeting user name away from
userInfo.preferred_username
Describe the solution you'd like
The ability to specify which claim, via environmental variable, to use as
context.name
besidesuserInfo.preferred_username
, it might also be useful to changescope
via environmental variable for this purpose too. I believecontext.name
is what it used as the default Jitsi Meet meeting user name? That is what I wish to change here.Describe alternatives you've considered
Using a custom Keycloak client scope mapper to redefine
preferred_username
but I think this would be better done on the adapter side.Additional context
The text was updated successfully, but these errors were encountered: