You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synapse Token Authenticator is a synapse auth provider which allows for token authentication (and optional registration) using JWTs (Json Web Tokens).
6
+
Synapse Token Authenticator is a synapse auth provider which allows for token authentication (and optional registration) using JWTs (Json Web Tokens) and OIDC.
# Allow registration of new users, defaults to false (optional)
48
+
allow_registration: false
38
49
```
39
50
It is recommended to have `require_expiry` set to `true` (default). As for `allow_registration`, it depends on usecase: If you only want to be able to log in *existing* users, leave it at `false` (default). If nonexistant users should be simply registered upon hitting the login endpoint, set it to `true`.
40
51
41
52
## Usage
53
+
54
+
### JWT Authentication
42
55
First you have to generate a JWT with the correct claims. The `sub` claim is the localpart or full mxid of the user you want to log in as. Be sure that the algorithm and secret match those of the configuration. An example of the claims is as follows:
43
56
```json
44
57
{
@@ -59,6 +72,10 @@ Next you need to post this token to the `/login` endpoint of synapse. Be sure th
59
72
}
60
73
```
61
74
75
+
### OIDC Authentication
76
+
77
+
<!-- TODO: write a summary of the notion page here -->
78
+
62
79
## Testing
63
80
64
81
The tests uses twisted's testing framework trial, with the development
0 commit comments