notbank
Version:
The Notbank for Node.js
18 lines (17 loc) • 412 B
JavaScript
export class Reauther {
constructor() {
this.authenticateFn = null;
}
updateAuthentication(authenticateFn) {
this.authenticateFn = authenticateFn;
}
removeAuthentication() {
this.authenticateFn = null;
}
makeAuthentication(connection) {
if (this.authenticateFn === null) {
return;
}
this.authenticateFn(connection);
}
}