F95API/app/scripts/classes/credentials.js

22 lines
449 B
JavaScript

"use strict";
// Modules from file
const { getF95Token } = require("../network-helper.js");
class Credentials {
constructor(username, password) {
this.username = username;
this.password = password;
this.token = null;
}
/**
* @public
* Fetch and save the token used to log in to F95Zone.
*/
async fetchToken() {
this.token = await getF95Token();
}
}
module.exports = Credentials;