mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +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)
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
|
||||
@@ -59,6 +59,8 @@ export class LocalstoreService {
|
||||
|
||||
export const localstoreService = new LocalstoreService()
|
||||
|
||||
// console.log( AES.encrypt( 'peter', 'v14-dba29fd8bdbf24ffe4840b0f778f70f6a163d424').toString())
|
||||
|
||||
// // Create WebSocket connection.
|
||||
// const socket = new WebSocket('ws://localhost:8080');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user