Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Attempt to validate macaroons #256

Merged
merged 4 commits into from
Sep 14, 2015
Merged

Attempt to validate macaroons #256

merged 4 commits into from
Sep 14, 2015

Conversation

illicitonion
Copy link
Contributor

A couple of weird caveats:

  • If we can't validate your macaroon, we fall back to checking that
    your access token is in the DB, and ignoring the failure
  • Even if we can validate your macaroon, we still have to hit the DB to
    get the access token ID, which we pretend is a device ID all over the
    codebase.

This mostly adds the interesting code, and points out the two pieces we
need to delete (and necessary conditions) in order to fix the above
caveats.

A couple of weird caveats:
 * If we can't validate your macaroon, we fall back to checking that
   your access token is in the DB, and ignoring the failure
 * Even if we can validate your macaroon, we still have to hit the DB to
   get the access token ID, which we pretend is a device ID all over the
   codebase.

This mostly adds the interesting code, and points out the two pieces we
need to delete (and necessary conditions) in order to fix the above
caveats.
@NegativeMjark
Copy link
Contributor

Slightly concerned by the s/user/user_id/. We fairly consistently use "user_id" when passing a str, and use "user" when passing a UserID object.

I'd prefer better names, but I'd rather keep consistency with the rest of the code.

@illicitonion
Copy link
Contributor Author

Done

@NegativeMjark
Copy link
Contributor

LGTM

illicitonion added a commit that referenced this pull request Sep 14, 2015
Attempt to validate macaroons
@illicitonion illicitonion merged commit 728d07c into develop Sep 14, 2015
@richvdh richvdh deleted the auth branch December 1, 2016 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants