Add testing

This commit is contained in:
Henry Hiles 2025-08-01 16:33:01 -04:00
commit 74a634c642
No known key found for this signature in database
3 changed files with 17 additions and 11 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
.dart_tool/
.direnv
secret
secrets/

24
.vscode/launch.json vendored
View file

@ -5,19 +5,25 @@
"version": "0.2.0",
"configurations": [
{
"name": "matrix-oauth2oidc",
"name": "nexusbot",
"program": "bin/nexusbot.dart",
"args": [
"--socket",
"./socket",
"--homeserver",
"https://matrix.federated.nexus",
"--jwtSecretFile",
"secret",
"--issuer",
"http://localhost:8080",
"--authorizeEndpoint",
"http://localhost:4321/login",
"--serviceDomain",
"federated.nexus"
"--name",
"nexusbot",
"--inviteTo",
"#community:federated.nexus",
"--adminRoom",
"#admins:federated.nexus",
"--successUri",
"https://federated.nexus/success",
"--botPasswordFile",
"secrets/botPassword.txt",
"--smtpPasswordFile",
"secrets/smtpPassword.txt"
],
"request": "launch",
"type": "dart"

View file

@ -5,4 +5,4 @@ build:
dart run build_runner build
test:
oauth2c http://localhost:8080 --client-id yourclientid --scopes openid --grant-type authorization_code --auth-method none --response-mode query
curl --unix-socket ./socket http:/root -X POST -d '{"email": "foo", "username": "bar"}'