Skip to content

Commit

Permalink
fix(auth): fix jwt interceptor to set Authorization header only if to…
Browse files Browse the repository at this point in the history
…ken is valid (#294)
  • Loading branch information
Darkheir authored and nnixaa committed Mar 12, 2018
1 parent e4b892e commit 1e99ff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class NbAuthJWTInterceptor implements HttpInterceptor {
return this.authService.getToken()
.pipe(
switchMap((token: NbAuthJWTToken) => {
if (token) {
if (token.isValid()) {
const JWT = `Bearer ${token.getValue()}`;
req = req.clone({
setHeaders: {
Expand Down

0 comments on commit 1e99ff3

Please sign in to comment.