mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add imporve
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user