Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-jwt

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-jwt - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

angular2-jwt.js

@@ -30,3 +30,3 @@ "use strict";

}());
AuthConfigConsts.DEFAULT_TOKEN_NAME = 'access_token';
AuthConfigConsts.DEFAULT_TOKEN_NAME = 'token';
AuthConfigConsts.DEFAULT_HEADER_NAME = 'Authorization';

@@ -33,0 +33,0 @@ AuthConfigConsts.HEADER_PREFIX_BEARER = 'Bearer ';

{
"name": "angular2-jwt",
"version": "0.2.1",
"version": "0.2.2",
"description": "Helper library for handling JWTs in Angular 2+",

@@ -5,0 +5,0 @@ "repository": {

@@ -120,3 +120,3 @@ # angular2-jwt

* Header Prefix: `Bearer`
* Token Name: `access_token`
* Token Name: `token`
* Token Getter Function: `(() => localStorage.getItem(tokenName))`

@@ -185,3 +185,3 @@ * Supress error and continue with regular HTTP request if no JWT is saved: `false`

globalHeaders: [{'Accept': 'application/json'}],
tokenGetter: (() => storage.get('access_token')),
tokenGetter: (() => storage.get('token')),
}), http);

@@ -263,3 +263,3 @@ }

useJwtHelper() {
var token = localStorage.getItem('access_token');
var token = localStorage.getItem('token');

@@ -279,3 +279,3 @@ console.log(

> **Note:** `tokenNotExpired` will by default assume the token name is `access_token` unless a token name is passed to it, ex: `tokenNotExpired('token_name')`. This will be changed in a future release to automatically use the token name that is set in `AuthConfig`.
> **Note:** `tokenNotExpired` will by default assume the token name is `token` unless a token name is passed to it, ex: `tokenNotExpired('token_name')`. This will be changed in a future release to automatically use the token name that is set in `AuthConfig`.

@@ -282,0 +282,0 @@ ```ts

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc