changing tests. removing importData func

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-11-25 23:05:10 +03:00
committed by Daniel Hutzel
parent 029ba61098
commit a04cc0c25f
10 changed files with 241 additions and 600 deletions

View File

@@ -24,14 +24,7 @@ service Users {
};
action login(email : String(111), password : String(200)) returns AuthData;
action refreshTokens(refreshToken : String(500)) returns {
accessToken : String(500);
refreshToken : String(500);
ID : Integer;
email : String(500);
roles : array of String(111);
};
action refreshTokens(refreshToken : String(500)) returns AuthData;
}
annotate Users.Customers with @(restrict : [{

View File

@@ -3,8 +3,8 @@ const jwt = require("jsonwebtoken");
const bcrypt = require("bcryptjs");
const { ACCESS_TOKEN_SECRET, REFRESH_TOKEN_SECRET } = cds.env;
const ACCESS_TOKEN_EXP_IN = "10m";
const REFRESH_TOKEN_EXPIRES_IN = "20m";
const ACCESS_TOKEN_EXP_IN = "10s";
const REFRESH_TOKEN_EXPIRES_IN = "15s";
const comparePasswords = async (password, hashedPassword) => {
return new Promise((resolve, reject) =>