F95API/app/scripts/classes/credentials.js

22 lines
449 B
JavaScript
Raw Normal View History

"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;
}
2020-12-15 13:09:16 +00:00
/**
* @public
* Fetch and save the token used to log in to F95Zone.
*/
async fetchToken() {
this.token = await getF95Token();
}
}
module.exports = Credentials;