| 1234567891011121314151617181920212223242526272829 |
- export class AuthenticationLoader {
- handlers = [];
- addAuthenticationHandler(authenticationHandler) {
- this.handlers.push(authenticationHandler);
- }
- async tryLogin(username, password, totpCode) {
- for (let i of this.handlers) {
- const result = await i.tryLogin(username, password, totpCode);
- if (result !== null)
- return result;
- }
- return false;
- }
- async needTotp(username) {
- for (let i of this.handlers) {
- const result = await i.needTotp(username);
- if (result !== null)
- return result;
- }
- return false;
- }
- }
- import { YesManAuthenticationHandler } from './yesManAuthenticationHandler.js';
- export { YesManAuthenticationHandler };
- import { TotpChecker } from './totpChecker.js';
- export { TotpChecker };
- import { SqliteAuthenticationHandler } from './sqliteAuthenticationHandler.js';
- export { SqliteAuthenticationHandler };
- //# sourceMappingURL=index.js.map
|