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

[RFC] AccessToken / RefreshToken -> Scope relation #14

Open
darckking opened this issue Aug 8, 2022 · 0 comments
Open

[RFC] AccessToken / RefreshToken -> Scope relation #14

darckking opened this issue Aug 8, 2022 · 0 comments

Comments

@darckking
Copy link

Hi
Can you pls explain your motivation to use ManyToMany between AccessToken and Scope ?
This differs from laminas-api-tools/api-tools-oauth2 database structure. There scope is space-separated list of restricted scopes and is baked into AccessToken / RefreshToken.
Imo the ManyToMany brings tiny overhead:

  1. it will trigger DB call to get all token's scopes;
  2. you will need join scopes to pull all you need from DB with one query;
  3. extra insertions when create token with bunch of scopes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant