mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
jwt implemented
This commit is contained in:
@@ -99,7 +99,7 @@ export class EventsService {
|
||||
this.headerSharedOficial= new HttpHeaders();;
|
||||
this.headerSharedPessoal= new HttpHeaders();;
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headers = this.headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
|
||||
this.usersCalendarIds = [];
|
||||
this.calendarNames = {}
|
||||
@@ -137,7 +137,7 @@ export class EventsService {
|
||||
this.hasOwnOficial = true
|
||||
|
||||
|
||||
this.headersMdOficial = this.headersMdOficial.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersMdOficial = this.headersMdOficial.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ export class EventsService {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
|
||||
@@ -159,7 +159,7 @@ export class EventsService {
|
||||
|
||||
this.hasSharedOficial = true
|
||||
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ export class EventsService {
|
||||
|
||||
this.hasSharedPessoal = true
|
||||
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ export class EventsService {
|
||||
|
||||
this.hasOwnOficial = true
|
||||
|
||||
this.headersPrOficial = this.headersPrOficial.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersPrOficial = this.headersPrOficial.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ export class EventsService {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
|
||||
@@ -216,7 +216,7 @@ export class EventsService {
|
||||
|
||||
this.hasOwnOficial = true
|
||||
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarName', calendar.CalendarName);
|
||||
@@ -225,7 +225,7 @@ export class EventsService {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarName', calendar.CalendarName);
|
||||
@@ -248,7 +248,7 @@ export class EventsService {
|
||||
if (sharedCalendar.CalendarName == 'Oficial') {
|
||||
this.hasSharedOficial = true
|
||||
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('Authorization',SessionStore.user.BasicAuthKey);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('Authorization','Bearer ' + SessionStore.user.Authorization);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarName', sharedCalendar.CalendarName);
|
||||
@@ -257,7 +257,7 @@ export class EventsService {
|
||||
|
||||
this.hasSharedPessoal = true
|
||||
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('Authorization',SessionStore.user.BasicAuthKey);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('Authorization','Bearer ' + SessionStore.user.Authorization);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName);
|
||||
@@ -378,7 +378,7 @@ export class EventsService {
|
||||
|
||||
makeHeader(calendar: calendarInterface) {
|
||||
let header = new HttpHeaders();;
|
||||
header = header.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
header = header.set('CalendarId', calendar.CalendarId);
|
||||
header = header.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
header = header.set('CalendarName', calendar.CalendarName);
|
||||
@@ -616,7 +616,7 @@ export class EventsService {
|
||||
|
||||
for(let agendasCalendar of agendasCalendars) {
|
||||
var header = new HttpHeaders();;
|
||||
header = header.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
header = header.set('CalendarId', agendasCalendar.CalendarId);
|
||||
header = header.set('CalendarRoleId', agendasCalendar.CalendarRoleId);
|
||||
header = header.set('CalendarName', agendasCalendar.CalendarName);
|
||||
@@ -649,7 +649,7 @@ export class EventsService {
|
||||
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
|
||||
|
||||
var header = new HttpHeaders();;
|
||||
header = header.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
header = header.set('CalendarId', sharedCalendar.CalendarId);
|
||||
header = header.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
header = header.set('CalendarName', sharedCalendar.CalendarName);
|
||||
|
||||
Reference in New Issue
Block a user