How to use the angular2-jwt.tokenNotExpired function in angular2-jwt

To help you get started, we’ve selected a few angular2-jwt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unfetter-discover / unfetter-ui / src / app / core / services / auth.service.ts View on Github external
public loggedIn(): boolean {
        if (this.runMode === 'DEMO') {
            return true;
        } else {
            let tokenExpired: boolean = true;
            try {
                tokenExpired = tokenNotExpired('unfetterUiToken');
            } catch (e) { }
            return tokenExpired && this.getUser() !== null && this.getUser().approved === true && !this.getUser().locked;
        }
    }
github OmicsDI / ddi-web-app / web / src / app / services / auth.service.ts View on Github external
loggedIn() {
    let result: boolean;
    result = tokenNotExpired("id_token");
    if(!result){
      return false;
    }
    return result;
  }
}
github efstathiosntonas / ngx-form / src / app / auth / auth.service.ts View on Github external
isLoggedIn() {
    if (!tokenNotExpired()) {
      localStorage.clear();
    }
    return tokenNotExpired();
  }
}
github fisenkodv / itinerary / src / Itinerary.Web / Client / app / auth / auth.service.ts View on Github external
public loggedIn(): boolean {
    let token = this.storageService.getToken(TokenType.AccessToken);
    let expired = tokenNotExpired('token', token);
    return expired;
  }
github parrot-translate / parrot / web-app / src / app / auth / services / auth.service.ts View on Github external
isLoggedIn(): boolean {
        let token = this.token.getToken();
        return tokenNotExpired(null, token);
    }

angular2-jwt

Helper library for handling JWTs in Angular 2+

MIT
Latest version published 8 years ago

Package Health Score

61 / 100
Full package analysis