@universis/janitor
Version:
Universis api plugin for handling user authorization and rate limiting
27 lines (23 loc) • 601 B
JavaScript
import {ApplicationService} from '@themost/common';
import passport from 'passport';
class PassportService extends ApplicationService {
constructor(app) {
super(app);
const authenticator = new passport.Authenticator();
Object.defineProperty(this, 'authenticator', {
configurable: true,
enumerable: false,
writable: false,
value: authenticator
});
}
/**
* @returns {import('passport').Authenticator}
*/
getInstance() {
return this.authenticator;
}
}
export {
PassportService
}