Add name to userinfo

This commit is contained in:
Henry Hiles 2025-07-26 10:08:10 -04:00
commit a86c8e2b26
No known key found for this signature in database

View file

@ -163,7 +163,7 @@ class ApiHelper {
await ref.read(KeyController.provider.future), await ref.read(KeyController.provider.future),
); );
return Response.ok( return Response.ok(
jsonEncode({"sub": jwt.subject}), jsonEncode({"sub": jwt.subject, "name": jwt.subject!.getName()}),
headers: {"Content-Type": "application/json"}, headers: {"Content-Type": "application/json"},
); );
} catch (e) { } catch (e) {
@ -207,7 +207,7 @@ class ApiHelper {
"token_endpoint": "${settings.issuer}/token", "token_endpoint": "${settings.issuer}/token",
"userinfo_endpoint": "${settings.issuer}/userinfo", "userinfo_endpoint": "${settings.issuer}/userinfo",
"introspection_endpoint": "${settings.issuer}/introspect", "introspection_endpoint": "${settings.issuer}/introspect",
"end_session_endpoint": "${settings.issuer}/logout", "end_session_endpoint": "#",
"response_types_supported": ["code"], "response_types_supported": ["code"],
"subject_types_supported": ["public"], "subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["HS256"], "id_token_signing_alg_values_supported": ["HS256"],