@obelisk/client
Advanced tools
Comparing version 2.7.1 to 2.7.2
@@ -112,2 +112,3 @@ import { Observable, Observer } from 'rxjs'; | ||
private getUma2Config; | ||
private updateLogInfo; | ||
/** | ||
@@ -114,0 +115,0 @@ * Checks a full url for a hash that can be parsed to a TokenResponse. |
@@ -311,2 +311,7 @@ "use strict"; | ||
} | ||
updateLogInfo(token) { | ||
// store logged in + expiration | ||
// console.debug('--updateing logInfo expires date for new RPT'); | ||
this._storage.add('logInfo', { authenticated: true, expires: token.getExpiresAt() }); | ||
} | ||
/** | ||
@@ -363,3 +368,4 @@ * Checks a full url for a hash that can be parsed to a TokenResponse. | ||
// store logged in + expiration | ||
this._storage.add('logInfo', { authenticated: true, expires: pat.getExpiresAt() }); | ||
// this._storage!.add('logInfo', { authenticated: true, expires: pat.getExpiresAt() }); | ||
this.updateLogInfo(pat); | ||
// this.scheduleTokenRefresh(pat, patRefresh); | ||
@@ -379,2 +385,3 @@ this.authOver$.next(); | ||
const offline = this._storage.get('offline'); | ||
// console.debug('--trying offline_token login'); | ||
if (offline && offline.token) { | ||
@@ -413,3 +420,4 @@ const url = this._uma2Config.token_endpoint; | ||
// store logged in + expiration | ||
this._storage.add('logInfo', { authenticated: true, expires: pat.getExpiresAt() }); | ||
// this._storage!.add('logInfo', { authenticated: true, expires: pat.getExpiresAt() }); | ||
this.updateLogInfo(pat); | ||
this.authOver$.next(); | ||
@@ -520,2 +528,4 @@ return rxjs_1.of(true); | ||
this._tokens.idtoken = new auth_1.Token(body.id_token); | ||
// ADDED | ||
this.updateLogInfo(this._tokens.rpt); | ||
this._events$.next({ type: interfaces_1.ClientEventType.OnRptChanged }); | ||
@@ -564,2 +574,4 @@ this._events$.next({ type: interfaces_1.ClientEventType.OnRolesChanged }); | ||
this._tokens.rptRefresh = new auth_1.Token(rpt.refresh_token); | ||
// ADDED | ||
this.updateLogInfo(this._tokens.rpt); | ||
this._events$.next({ type: interfaces_1.ClientEventType.OnRptChanged }); | ||
@@ -585,2 +597,4 @@ this._events$.next({ type: interfaces_1.ClientEventType.OnRolesChanged }); | ||
this._tokens.rptRefresh = new auth_1.Token(rpt.refresh_token); | ||
// ADDED | ||
this.updateLogInfo(this._tokens.rpt); | ||
this._events$.next({ type: interfaces_1.ClientEventType.OnRptChanged }); | ||
@@ -587,0 +601,0 @@ this._events$.next({ type: interfaces_1.ClientEventType.OnRolesChanged }); |
{ | ||
"name": "@obelisk/client", | ||
"version": "2.7.1", | ||
"version": "2.7.2", | ||
"description": "Typescript client to interact with Obelisk on a higher level than the regular ReST API calls.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110253
2888