dashboard
repositories
activity
search
login
common
/
securis
summary
reflog
commits
tree
compare
forks
blame
|
history
|
raw
|
HEAD
#0 enh - Configuring dev mode dynamically
rsanchez
2017-04-17
19be37d4112b9c1ff2568af4c652deccd4c0b3c5
[common/securis.git]
/
securis
/
src
/
main
/
webapp
/
src
/
app
/
common
/
session.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Locker } from 'angular-safeguard';
import { Injectable } from '@angular/core';
declare var window: any;
export const IS_DEV_MODE : Boolean = window.location.href.startsWith("http://localhost");
@Injectable()
export class SeCurisSession {
sessionData: any = {}
constructor(private store: Locker) {
}
public get(key: string): any {
return this.sessionData[key];
}
public exists(key: string): boolean {
return this.sessionData[key] != undefined;
}
public set(key: string, value: any): void {
this.sessionData[key] = value;
}
public remove(key: string) : void {
delete this.sessionData[key];
}
}