address logout

This commit is contained in:
gowthaman.b
2024-05-08 14:03:08 +05:30
parent 0a0e627b4a
commit c4985f9690
2 changed files with 17 additions and 8 deletions

View File

@@ -65,6 +65,7 @@ fun main(args: Array<String>) {
get("/init", Auth::init)
get("/code", Auth::code)
get("/keys", Auth::keys)
post("/logout", Auth::logout)
post("/refresh", Auth::refreshToken)
}
before("/api/*") { ctx ->
@@ -80,9 +81,6 @@ fun main(args: Array<String>) {
setAuthorizedUser(validateAuthToken(authToken = authToken))
if (appConfig.enforcePayloadEncryption()) {
//todo: decrypt the request from user
}
}
after("/api/*") {
@@ -94,9 +92,6 @@ fun main(args: Array<String>) {
it.header("X-Checksum", outEncoded)
it.header("X-Signature", signPayload(outEncoded))
if (appConfig.enforcePayloadEncryption()) {
//todo: encrypt and send the response back to user
}
}
path("/api") {