mirror of
https://github.com/mudabbir-ahmad/Media-Aggregation-and-Sorting-System.git
synced 2026-10-08 03:40:20 +00:00
created a localised login system
This commit is contained in:
1 parent
59ac1fc926
commit
37511780b7
16 files changed
+3721
-20
No files matched your search
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Abstract base class for authentication services
|
||||
* This provides a common interface for different authentication providers
|
||||
*/
|
||||
export class AuthServiceBase {
|
||||
constructor() {
|
||||
if (new.target === AuthServiceBase) {
|
||||
throw new TypeError('Cannot instantiate abstract class');
|
||||
}
|
||||
}
|
||||
|
||||
async authenticate() {
|
||||
throw new Error('authenticate() must be implemented');
|
||||
}
|
||||
|
||||
async getAccessToken() {
|
||||
throw new Error('getAccessToken() must be implemented');
|
||||
}
|
||||
|
||||
async refreshToken() {
|
||||
throw new Error('refreshToken() must be implemented');
|
||||
}
|
||||
|
||||
async revokeAccess() {
|
||||
throw new Error('revokeAccess() must be implemented');
|
||||
}
|
||||
|
||||
async getUserInfo() {
|
||||
throw new Error('getUserInfo() must be implemented');
|
||||
}
|
||||
}
|
||||
|
||||
export default AuthServiceBase;
|
||||
|
||||
Reference in new issue
Block a user