add imporve

This commit is contained in:
Peter Maquiran
2021-08-19 18:18:20 +01:00
parent 9024230115
commit 03477135b4
3 changed files with 6 additions and 11 deletions
+3 -6
View File
@@ -49,19 +49,16 @@ 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.domainName + ':' + user.password);
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + user.password); //conversão em base64 das credenciais inseridas
console.log('Basic ' + btoa(user.username + ':' + SHA1(user.password).toString())); //conversão em base64 das credenciais inseridas
console.log('Basic ' + btoa(user.username + ':' + SHA1(user.password).toString())); //conversão em base64 das credenciais inseridas
const options = { headers: {'Authorization': user.BasicAuthKey }};
this.headers = this.headers.set('Authorization',user.BasicAuthKey);
this.opts = {
headers: this.headers,
}
const service = environment.apiURL + "userauthentication/GetValidateAuth";
let result: boolean | PromiseLike<boolean> = false;
let response: any;
try {
@@ -78,7 +75,7 @@ export class AuthService {
response.BasicAuthKey = user.BasicAuthKey
this.ValidatedUser = response;
console.log('response', response)
// console.log('response', response)
this.localstoreService.set('user', response)
this.userStore.reset(response)