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("/bridge", apiHelper.bridgeHandler)
|
||||
..post("/login", apiHelper.handleLogin)
|
||||
..post("/login", apiHelper.loginHandler)
|
||||
..post("/logout", apiHelper.logoutHandler)
|
||||
..post("/token", apiHelper.tokenHandler))
|
||||
.call,
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@ class ApiHelper {
|
|||
final Ref ref;
|
||||
ApiHelper(this.ref);
|
||||
|
||||
Future<Response> handleLogin(Request request) async {
|
||||
Future<Response> loginHandler(Request request) async {
|
||||
final body = await request.readAsString();
|
||||
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(_) {
|
||||
final settings = ref.read(SettingsController.provider)!;
|
||||
return Response.ok(
|
||||
|
@ -165,6 +168,7 @@ class ApiHelper {
|
|||
"authorization_endpoint": settings.authorizeEndpoint,
|
||||
"token_endpoint": "${settings.issuer}/token",
|
||||
"userinfo_endpoint": "${settings.issuer}/userinfo",
|
||||
"end_session_endpoint": "${settings.issuer}/logout",
|
||||
"response_types_supported": ["code"],
|
||||
"subject_types_supported": ["public"],
|
||||
"id_token_signing_alg_values_supported": ["HS256"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue