lacqueristas / universe

It started with a ❗
1 stars 1 forks source link

As a User I can create a new Project #10

Closed krainboltgreene closed 7 years ago

krainboltgreene commented 7 years ago

Projects have:

www: https://github.com/lacqueristas/www/pull/160 origin: https://github.com/lacqueristas/origin/pull/5

krainboltgreene commented 7 years ago

This is also where we figure out how to handle authentication and authorization.

So here's what the server knows:

Here's what we have to figure out:

btamayo commented 7 years ago

On it! I know, I really wanna use JWT because I want to push it forward for other projects but I haven't settled on a library. :/ @krainboltgreene

krainboltgreene commented 7 years ago

@btamayo In the meantime I've gone with a really simple scheme.

  1. Create a session with email/password, receive "token" (encrypted account id of the session)
  2. Put the "token" in the Authentication header Authentication: Bearer {{token}}, decrypt the token to get the account id, authorize based on that.

As long as anyone has a token that decrypts to a account id, they are that account. It's essentially just a password. Not the most secure and subject to replay attacks and I can't kill individual sessions.