Add dummy logout endpoint
This commit is contained in:
parent
53df67a4ce
commit
8efb087cdd
2 changed files with 7 additions and 2 deletions
|
@ -35,7 +35,8 @@ void main(List<String> argsRaw) async {
|
||||||
)
|
)
|
||||||
..get("/userinfo", apiHelper.userinfoHandler)
|
..get("/userinfo", apiHelper.userinfoHandler)
|
||||||
..get("/bridge", apiHelper.bridgeHandler)
|
..get("/bridge", apiHelper.bridgeHandler)
|
||||||
..post("/login", apiHelper.handleLogin)
|
..post("/login", apiHelper.loginHandler)
|
||||||
|
..post("/logout", apiHelper.logoutHandler)
|
||||||
..post("/token", apiHelper.tokenHandler))
|
..post("/token", apiHelper.tokenHandler))
|
||||||
.call,
|
.call,
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,7 +12,7 @@ class ApiHelper {
|
||||||
final Ref ref;
|
final Ref ref;
|
||||||
ApiHelper(this.ref);
|
ApiHelper(this.ref);
|
||||||
|
|
||||||
Future<Response> handleLogin(Request request) async {
|
Future<Response> loginHandler(Request request) async {
|
||||||
final body = await request.readAsString();
|
final body = await request.readAsString();
|
||||||
final data = Uri.splitQueryString(body);
|
final data = Uri.splitQueryString(body);
|
||||||
|
|
||||||
|
@ -157,6 +157,9 @@ class ApiHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<Response> logoutHandler(Request request) async =>
|
||||||
|
Response.ok("Log out is not currently implemented");
|
||||||
|
|
||||||
Response openidConfiguration(_) {
|
Response openidConfiguration(_) {
|
||||||
final settings = ref.read(SettingsController.provider)!;
|
final settings = ref.read(SettingsController.provider)!;
|
||||||
return Response.ok(
|
return Response.ok(
|
||||||
|
@ -165,6 +168,7 @@ class ApiHelper {
|
||||||
"authorization_endpoint": settings.authorizeEndpoint,
|
"authorization_endpoint": settings.authorizeEndpoint,
|
||||||
"token_endpoint": "${settings.issuer}/token",
|
"token_endpoint": "${settings.issuer}/token",
|
||||||
"userinfo_endpoint": "${settings.issuer}/userinfo",
|
"userinfo_endpoint": "${settings.issuer}/userinfo",
|
||||||
|
"end_session_endpoint": "${settings.issuer}/logout",
|
||||||
"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"],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue