Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Google Groups authorization calls Google API on each request #50

Open
3sGgpQ8H opened this issue Nov 27, 2019 · 1 comment
Open

Google Groups authorization calls Google API on each request #50

3sGgpQ8H opened this issue Nov 27, 2019 · 1 comment

Comments

@3sGgpQ8H
Copy link

It seems that Google Groups authorization checks user membership in groups on every HTTP request. This is suboptimal. Should probably check only once before issuing TOKEN cookie. Then, in case TOKEN cookie is still valid, it should assume that user is authorized without checking group membership again.

@payton
Copy link
Contributor

payton commented Nov 29, 2019

Agreed. This may involve a bit of a larger change. The original concept was that we decouple authentication and authorization such that the user is first authenticated and then authorized. The authorization step was set up such that it should call the callback function with a pass or fail.

This change would require we decouple calling the callback function and the authorization function (which is probably how things should've been set up in the first place).

Suggested changes:

  1. For each authz file, remove callback, internalServerError, and unauthorized parameters and add a boolean return
  2. Adjust the corresponding usage of auth.isAuthorized in the authn files to handle the boolean and end execution with a call to callback, internalServerError, or unauthorized

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

No branches or pull requests

2 participants