mirror of https://github.com/matrix-org/go-neb.git
Browse Source
Add concept of AuthSessions
Add concept of AuthSessions
Auth sessions are a single auth process between a user and an auth realm. As such, they are keyed off the tuple of `(user_id, realm_id)`. Only the realm which they belong to knows how to construct them, hence all "load" sections require an `AuthRealm` to be extracted first. Currently I pass in a `json.RawMessage` rather than factory initialise and clobber public fields based on the JSON, we can always change that if need be later down the line. Overall, this feels really nice (when starting to add in GH auth, everything I wanted was already there in the right place waiting for me).kegan/auth-session
Kegan Dougal
8 years ago
6 changed files with 180 additions and 0 deletions
-
43src/github.com/matrix-org/go-neb/api.go
-
27src/github.com/matrix-org/go-neb/database/db.go
-
70src/github.com/matrix-org/go-neb/database/schema.go
-
1src/github.com/matrix-org/go-neb/goneb.go
-
30src/github.com/matrix-org/go-neb/realms/github/github.go
-
9src/github.com/matrix-org/go-neb/types/types.go
Write
Preview
Loading…
Cancel
Save
Reference in new issue