Bug fixed encrypting the password

This commit is contained in:
Eudes Inácio
2021-08-27 10:13:35 +01:00
parent 85d17c52b0
commit 181da6b1e0
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -52,8 +52,10 @@ export class AuthService {
async login(user: UserForm): Promise<boolean> {
// user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password);
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + user.password); //conversão em base64 das credenciais inseridas
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username ));
//conversão em base64 das credenciais inseridas
console.log('Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username ))); //conversão em base64 das credenciais inseridas
console.log("Encript ",this.aesencrypt.encrypt(user.password,user.username ))
this.headers = this.headers.set('Authorization',user.BasicAuthKey);