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

auth token should pass through #1

Closed
broskoski opened this issue Sep 18, 2015 · 1 comment
Closed

auth token should pass through #1

broskoski opened this issue Sep 18, 2015 · 1 comment

Comments

@broskoski
Copy link
Contributor

The unresolved issue I see here is authentication + caching. Ideally:

  • An X-AUTH-TOKEN is passed through the request
  • Metaphysics maintains an admin token to have the data it needs to show ui-specific computed attributes (i.e. show_carousel).

First thing that comes to mind is whitelisting attributes based on what is returned by a non-admin, and allowing those + whatever is computed to be returned in the response. We ideally don't want to deal with two sets of caches per admin and non-admin (and whatever else comes down the line). There may be some cases that I am overlooking here (can_download_image for example).

@dzucconi
Copy link
Member

I can see us defining domain objects that have serializers to handle the whitelisting + virtual attributes.

Virtual attributes that get computed on a per req basis would be fine: just pass whatever "permissions" you need and the user might have in your request and deal with it based on that.

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

2 participants