fix issues in backend implementions,

auth endpoint now fetches all relevant backend tokens
This commit is contained in:
2024-01-17 20:21:55 +00:00
parent 1a8e804be1
commit a31d5a3336
6 changed files with 141 additions and 44 deletions
+21 -4
View File
@@ -35,17 +35,34 @@ export class BACKEND {
/**
* Opens a session with the backend and creates session tokens if needed
* @param {Object} credentials object containing username and password fields
* @returns {Object[]} list of session token objects with token name and value
* @returns {Object} response like object with ok, status, and list of session token objects with token name and value
*/
openSession (credentials) {}
openSession (credentials) {
return {
ok: true,
status: 200,
cookies: []
};
}
/**
* Closes an opened session with the backend if needed
* @param {*} token list of session token objects with token name and value
* @param {Object[]} token list of session token objects with token name and value, may include irrelevant tokens for a specific backend
* @returns {Boolean} true if session was closed successfully, false otherwise
*/
closeSesssion (tokens) {}
closeSession (tokens) {
return {
ok: true,
status: 200
};
}
}
/**
* Interface for proxmox api backends.
*/
export class PVE_BACKEND extends BACKEND {}
/**
* Interface for user database backends.
*/