Kegan Dougal
ed78b0cbcf
Spelling
8 years ago
Kegan Dougal
ca1168147f
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).
8 years ago
Kegsay
5711bd0618
Merge pull request #7 from matrix-org/kegan/rm-3pauth
Remove concept of AuthModule and ThirdPartyAuth
8 years ago
Kegsay
a990bfb927
Merge pull request #6 from matrix-org/kegan/auth-realms
Add concept of AuthRealms
8 years ago
Kegan Dougal
098101015b
Remove concept of AuthModule and ThirdPartyAuth
Replaced by AuthRealm and AuthSession.
8 years ago
Kegan Dougal
36eb21be7c
Add concept of AuthRealms
- These represent a place where a user can authenticate themselves.
- They function in the same way as Services (insert/update based on an HTTP API)
- They currently don't *do* a lot other than exist for storing realm-specific
information (e.g. the `GithubRealm` stores the `ClientSecret` and `ClientID`)
8 years ago
Kegsay
e9ebaceecf
Merge pull request #5 from matrix-org/kegan/github-webhook
Send GH webhook notifications based on GH service config
8 years ago
Kegan Dougal
51a5b97aad
Merge branch 'master' into kegan/github-webhook
8 years ago
Kegan Dougal
8598e71124
Send webhook notifications to rooms specified in the service config
8 years ago
Kegan Dougal
e88dc544bd
Tweak github webhook to parse but not send webhook notifications
The client and which room IDs to send to are known by Service so let that do it
instead.
8 years ago
Kegsay
d7e7b9b1ae
Merge pull request #3 from matrix-org/kegan/auth
Add skeleton for auth modules
8 years ago
Kegan Dougal
6b250c8528
Merge branch 'master' into kegan/auth
8 years ago
Kegsay
72a08baba2
Merge pull request #4 from matrix-org/kegan/webhook-path-as-id
Use the service ID in the webhook path instead of the service type
8 years ago
Kegan Dougal
fe1854feaf
Use the service ID in the webhook path instead of the service type
This means we can load the Service from the database then invoke
OnIncomingWebhook on it, rather than load up a new Service.
8 years ago
Kegan Dougal
8fea4bb0ab
Add AuthModule concept
- Register them like we are with Services.
- Add `/configureAuth` endpoint to create/update auth.
- Move ThirdPartyAuth out of the database layer since they are passed as
params to `/admin/configureAuth`
8 years ago
Kegan Dougal
514d59e4d5
Remove Service ID from ThirdPartyAuth; query off resource instead.
This de-couples ThirdPartyAuth from Services so we can do auth without having
to instantiate Services.
8 years ago
Kegan Dougal
272617170d
Merge branch 'master' into kegan/auth
8 years ago
Kegan Dougal
e8be9c4a10
More notes
8 years ago
Kegan Dougal
1d08fcbb18
Add LoadThirdPartyAuthsForUser and StoreThirdPartyAuth
8 years ago
Kegan Dougal
cdee3d1a51
Add ThirdPartyAuth struct and third_party_auth table with CRU operations
8 years ago
Kegsay
e6813169b8
Merge pull request #2 from matrix-org/kegan/webhooks
Add a webhook handler and parse incoming Github webhook events
8 years ago
Kegan Dougal
41ba67235a
Add handler for /services/hooks/{serviceType}
Defers through to the given service's OnReceiveWebhook method.
8 years ago
Kegan Dougal
0168f92023
Add tests for webhook event parsing to HTML
8 years ago
Kegan Dougal
665d43f726
Parse github webhook requests into suitable HTML messages
Verifies requests using an optional secret token. This commit doesn't
implement sending of these messages.
8 years ago
Kegan Dougal
edf3f87674
Move database/types.go to types/types.go in its own 'types' package
There is nothing specific to the types to warrant them being under the database
package.
8 years ago
Kegsay
7dda10503b
Merge pull request #1 from matrix-org/kegan/github
Add a github service with issue/PR expansion
8 years ago
Kegan Dougal
d6b946f200
Make regexp top-level as per PR comments
8 years ago
Kegan Dougal
9cdd546ba6
Remove spurious !github command
8 years ago
Kegan Dougal
19fd719e20
Merge branch 'master' into kegan/github
8 years ago
Kegan Dougal
e1f568e3fb
Put notes somewhere useful
8 years ago
Kegan Dougal
01e51f36a9
Add github issue expansion for things that look like owner/repo#11
8 years ago
Kegan Dougal
b808c4155a
Merge branch 'master' into kegan/github
8 years ago
Kegan Dougal
4896620287
Add OAuth2 dep
8 years ago
Kegan Dougal
c92fc3c19e
Merge branch 'master' into kegan/github
8 years ago
Kegan Dougal
81818829c8
Add github dep
8 years ago
Kegan Dougal
7f0af81330
Add very noddy github service. Add owner/repo#11 expander.
8 years ago
Kegan Dougal
8af5086985
s/Make/New/ as is the convention in the golang stdlib
8 years ago
Mark Haines
26f95fdeb8
Add the pre-commit hooks and development instructions
8 years ago
Mark Haines
65dbf1951a
Add build instructions
8 years ago
Mark Haines
01e826955e
Fix hypenation of go-neb in README
8 years ago
Mark Haines
9c83637852
An extensible Matrix bot written in Go
8 years ago