Merge "Fix to properties load for blueprints-processor"
[ccsdk/features.git] / sdnr / wt / odlux / framework / src / services / authenticationService.ts
1 function timeout(ms:number) {
2   return new Promise(resolve => setTimeout(resolve, ms));
3 }
4
5 class AuthenticationService {
6   public async authenticateUser(email: string, password: string) : Promise<string | null> {
7     await timeout(650);
8     if (email === "max@odlux.com" && password === "geheim") {
9       return "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPRExVWCIsImlhdCI6MTUzODQ2NDMyMCwiZXhwIjoxNTcwMDAwMzIwLCJhdWQiOiJsb2NhbGhvc3QiLCJzdWIiOiJsb2NhbGhvc3QiLCJmaXJzdE5hbWUiOiJNYXgiLCJsYXN0TmFtZSI6Ik11c3Rlcm1hbm4iLCJlbWFpbCI6Im1heEBvZGx1eC5jb20iLCJyb2xlIjpbInVzZXIiLCJhZG1pbiJdfQ.9e5hDi2uxmIXNwHkJoScBZsHBk0jQ8CcZ7YIcZhDtuI"
10     }
11     return null;
12   }
13 }
14
15 export const authenticationService = new AuthenticationService();
16 export default authenticationService;