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

User Account: Add authclient, authclient_id. #106

Closed
luke- opened this issue Mar 13, 2023 · 2 comments
Closed

User Account: Add authclient, authclient_id. #106

luke- opened this issue Mar 13, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@luke-
Copy link
Contributor

luke- commented Mar 13, 2023

  • It should be possible to specify the following optional account fields when creating a user:

  • authclient referes to user.auth_mode

  • authclient_id referes to user.authclient_id.

https://github.com/humhub/rest/blob/master/definitions/UserDefinitions.php#L51

These are also to be returned.

  • In addition to /user/get-by-username, there should also be a /user/get-by-authclient.

This should find the user by the parameters name of the authclient (user.auth_mode) and id value of user.authclient_id.

@yurabakhtin
Copy link
Contributor

@luke- PR #111: Please note on previous version the core scenario User::SCENARIO_EDIT_ADMIN was used from REST API side for add and update user, in order to don't touch the core scenario I decided to extend the model User from REST module side with new model ApiUser.
If you don't like such wrapper/extenssion please let me know, and otherwise we should modify a core side in order to either add fields into the existing scenario or create new one with name like SCENARIO_API_REQUEST = 'apiRequest, but I am not sure it is a good idea to mix a code from module with core code.

@luke-
Copy link
Contributor Author

luke- commented Mar 22, 2023

@yurabakhtin Thanks, the Wrapper Solution is good in this case.

@luke- luke- closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants