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

Os_types: use submodule User and Group. #263

Closed
dannywillems opened this issue Oct 31, 2016 · 0 comments
Closed

Os_types: use submodule User and Group. #263

dannywillems opened this issue Oct 31, 2016 · 0 comments
Assignees

Comments

@dannywillems
Copy link
Member

dannywillems commented Oct 31, 2016

PR #264
A module Os_types is used to define only types like userid, groupid, user, etc to be able to use them in all modules to have clearer interfaces and avoid circular dependencies.

For the moment, we have Os_types.userid, Os_types.groupid, Os_types.user, Os_types.group and Os_types.activationlinkkey_info in this module.

As this module will grow in the future (more types will be added), I think it will be better to define submodules and have Os_types.User.id, Os_types.User.t, Os_types.Group.id, Os_types.Group.t and Os_types.Activation_link_key.info. I think this method is clearer because if we want to add more types related to users, we add a type in the submodule User and we won't have something like Os_types.user_new_types_1, Os_types.user_new_types_2, etc.

I come back on OAuth2 and OpenID Connect (see #10) and I defined lots of different types (server_id, client_id, oauth2_client, oauth2_server, etc) used in different modules and it's very ugly if I prefix all things with Os_types.oauth2_client_foo_bar_baz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant