Skip to content
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

keycloak-js: add KeycloakUserInfo interface #16

Open
tomperr opened this issue Apr 28, 2023 · 2 comments
Open

keycloak-js: add KeycloakUserInfo interface #16

tomperr opened this issue Apr 28, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@tomperr
Copy link

tomperr commented Apr 28, 2023

Area

adapter/javascript

Description

Currently, KeycloakUserInfo interface does not exist, but the code suggests that it should be implemented:

https://github.com/keycloak/keycloak/blob/9186327807477f4ca5c36d0adb6fd7b7f62b9721/js/libs/keycloak-js/dist/keycloak.d.ts#L461-L464

This new interface will then be used for the return value of loadUserInfo, that currently returns an untyped object

https://github.com/keycloak/keycloak/blob/9186327807477f4ca5c36d0adb6fd7b7f62b9721/js/libs/keycloak-js/dist/keycloak.d.ts#L618-L621

Discussion

No response

Motivation

Other methods and attributes have their own interfaces, such as userProfile and loadUserProfile using KeycloakProfile. It should be the same for userInfo and loadUserInfo with KeycloakUserInfo.

Details

Simply implement KeycloakUserInfo interface and add it to userInfo attribute and loadUserInfo method

@tomperr
Copy link
Author

tomperr commented Apr 28, 2023

As it is an easy enhancement, I might do it by myself in the next days

@jonkoops
Copy link
Contributor

Feel free to open up a PR for this, I am not sure why this is marked as 'private' but we might as well type it correctly.

@jonkoops jonkoops added the help wanted Extra attention is needed label Apr 28, 2023
@jonkoops jonkoops self-assigned this May 11, 2023
@jonkoops jonkoops transferred this issue from keycloak/keycloak Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants