rm jwk stuff

This commit is contained in:
Henry Hiles 2025-06-21 20:06:09 -04:00
commit a3733511b6
No known key found for this signature in database
2 changed files with 2 additions and 8 deletions

View file

@ -34,7 +34,6 @@ void main(List<String> argsRaw) async {
apiHelper.openidConfiguration,
)
..get("/userinfo", apiHelper.userinfoHandler)
..get("/jwks.json", apiHelper.jwks)
..post("/login", apiHelper.handleLogin)
..post("/token", apiHelper.tokenHandler))
.call,

View file

@ -81,11 +81,12 @@ class ApiHelper {
);
final token = jwt.sign(SecretKey(secret), algorithm: JWTAlgorithm.HS256);
print("Token: $token"); //TODO: Remove
return Response.ok(
json.encode({
"id_token": token,
"access_token": token, // TODO: Use real access token
"access_token": token,
"token_type": "Bearer",
"expires_in": 600,
}),
@ -118,11 +119,6 @@ class ApiHelper {
}
}
Response jwks(_) => Response.ok(
json.encode({"keys": []}),
headers: {"content-type": "application/json"},
);
Response openidConfiguration(_) {
final settings = ref.read(SettingsController.provider)!;
return Response.ok(
@ -131,7 +127,6 @@ class ApiHelper {
"authorization_endpoint": settings.authorizeEndpoint,
"token_endpoint": "${settings.issuer}/token",
"userinfo_endpoint": "${settings.issuer}/userinfo",
"jwks_uri": "${settings.issuer}/jwks.json",
"response_types_supported": ["code"],
"subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["HS256"],