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

@auth0/angular-jwt

Package Overview
Dependencies
Maintainers
15
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auth0/angular-jwt - npm Package Compare versions

Comparing version 1.0.0-beta.9 to 1.0.0-beta.10

23

bundles/core.umd.js

@@ -264,17 +264,8 @@ (function webpackUniversalModuleDefinition(root, factory) {

JwtInterceptor.prototype.isWhitelistedDomain = function (request) {
var requestUrl;
try {
requestUrl = new URL(request.url);
return (this.whitelistedDomains.findIndex(function (domain) {
return typeof domain === 'string'
? domain === requestUrl.host
: domain instanceof RegExp ? domain.test(requestUrl.host) : false;
}) > -1);
}
catch (err) {
// if we're here, the request is made
// to the same domain as the Angular app
// so it's safe to proceed
return true;
}
var requestUrl = new URL(request.url);
return (this.whitelistedDomains.findIndex(function (domain) {
return typeof domain === 'string'
? domain === requestUrl.host
: domain instanceof RegExp ? domain.test(requestUrl.host) : false;
}) > -1);
};

@@ -423,2 +414,2 @@ JwtInterceptor.prototype.handleInterception = function (token, request, next) {

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAzNzA0N2M0MTdmNjBlNWMyOWVlNCIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJAYW5ndWxhci9jb3JlXCIiLCJ3ZWJwYWNrOi8vLy4vc3JjL2p3dG9wdGlvbnMudG9rZW4udHMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2p3dGhlbHBlci5zZXJ2aWNlLnRzIiwid2VicGFjazovLy8uL3NyYy9qd3QuaW50ZXJjZXB0b3IudHMiLCJ3ZWJwYWNrOi8vLy4vaW5kZXgudHMiLCJ3ZWJwYW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pbnQtbG9hZGVyIS4vaW5kZXgudHMiLCJtb2R1bGUuZXhwb3J0cyA9IF9fV0VCUEFDS19FWFRFUk5BTF9NT0RVTEVfNV9fO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwicnhqcy9PYnNlcnZhYmxlXCJcbi8vIG1vZHVsZSBpZCA9IDVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwibW9kdWxlLmV4cG9ydHMgPSBfX1dFQlBBQ0tfRVhURVJOQUxfTU9EVUxFXzZfXztcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcInJ4anMvYWRkL29ic2VydmFibGUvZnJvbVByb21pc2VcIlxuLy8gbW9kdWxlIGlkID0gNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCJtb2R1bGUuZXhwb3J0cyA9IF9fV0VCUEFDS19FWFRFUk5BTF9NT0RVTEVfN19fO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwicnhqcy9hZGQvb3BlcmF0b3IvbWVyZ2VNYXBcIlxuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCJtb2R1bGUuZXhwb3J0cyA9IF9fV0VCUEFDS19FWFRFUk5BTF9NT0RVTEVfOF9fO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwiQGFuZ3VsYXIvY29tbW9uL2h0dHBcIlxuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9
{
"name": "@auth0/angular-jwt",
"version": "1.0.0-beta.9",
"version": "1.0.0-beta.10",
"description": "JSON Web Token helper library for Angular",

@@ -13,8 +13,3 @@ "scripts": {

},
"keywords": [
"angular",
"angular 2",
"authentication",
"jwt"
],
"keywords": ["angular", "angular 2", "authentication", "jwt"],
"author": "Ryan Chenkie",

@@ -30,36 +25,36 @@ "license": "MIT",

"peerDependencies": {
"@angular/common": ">=4.3.0"
"@angular/common": "^4.4.6||^5.0.0"
},
"devDependencies": {
"@angular/animations": "^4.3.0",
"@angular/common": "^4.3.0",
"@angular/compiler": "^4.3.0",
"@angular/compiler-cli": "^4.3.0",
"@angular/core": "^4.3.0",
"@angular/http": "^4.3.0",
"@angular/platform-browser": "^4.3.0",
"@angular/platform-browser-dynamic": "^4.3.0",
"@angular/platform-server": "^4.3.0",
"@angular/router": "^4.3.0",
"@types/hammerjs": "2.0.34",
"@types/jasmine": "2.5.47",
"@types/node": "7.0.22",
"awesome-typescript-loader": "3.1.3",
"clean-webpack-plugin": "0.1.16",
"core-js": "2.4.1",
"istanbul-instrumenter-loader": "2.0.0",
"jasmine-core": "2.6.2",
"loader-utils": "1.1.0",
"reflect-metadata": "0.1.10",
"rimraf": "2.6.1",
"rxjs": "5.4.0",
"semantic-release": "6.3.6",
"source-map-loader": "0.2.1",
"ts-helpers": "1.1.2",
"tslint": "5.3.2",
"tslint-loader": "3.5.3",
"typescript": "2.3.3",
"webpack": "3.1.0",
"zone.js": "0.8.11"
"@angular/animations": "^4.4.6||^5.0.0",
"@angular/common": "^4.4.6||^5.0.0",
"@angular/compiler": "^4.4.6||^5.0.0",
"@angular/compiler-cli": "^4.4.6||^5.0.0",
"@angular/core": "^4.4.6||^5.0.0",
"@angular/http": "^4.4.6||^5.0.0",
"@angular/platform-browser": "^4.4.6||^5.0.0",
"@angular/platform-browser-dynamic": "^4.4.6||^5.0.0",
"@angular/platform-server": "^4.4.6||^5.0.0",
"@angular/router": "^4.4.6||^5.0.0",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "^2.5.47",
"@types/node": "^7.0.22",
"awesome-typescript-loader": "^3.1.3",
"clean-webpack-plugin": "^0.1.16",
"core-js": "^2.4.1",
"istanbul-instrumenter-loader": "^2.0.0",
"jasmine-core": "^2.6.2",
"loader-utils": "^1.1.0",
"reflect-metadata": "^0.1.10",
"rimraf": "^2.6.1",
"rxjs": "^5.4.0",
"semantic-release": "^6.3.6",
"source-map-loader": "^0.2.1",
"ts-helpers": "^1.1.2",
"tslint": "^5.3.2",
"tslint-loader": "^3.5.3",
"typescript": "^2.3.3",
"webpack": "^3.1.0",
"zone.js": "^0.8.11"
}
}

@@ -9,2 +9,4 @@ # @auth0/angular-jwt

> **Note:** Internet Explorer 11 support requires a [URL polyfill](https://github.com/github/url-polyfill)
## Installation

@@ -251,2 +253,41 @@

## Configuration Options
### `JwtHelper: service`
This service contains helper functions:
## isTokenExpired (old tokenNotExpired function)
```
import { JwtHelper } from '@auth0/angular-jwt';
// ...
constructor(public jwtHelper: JwtHelper) {}
ngOnInit() {
console.log(this.jwtHelper.isTokenExpired()); // true or false
}
```
## getTokenExpirationDate
```
import { JwtHelper } from '@auth0/angular-jwt';
// ...
constructor(public jwtHelper: JwtHelper) {}
ngOnInit() {
console.log(this.jwtHelper.getTokenExpirationDate()); // date
}
```
## decodeToken
```
import { JwtHelper } from '@auth0/angular-jwt';
// ...
constructor(public jwtHelper: JwtHelper) {}
ngOnInit() {
console.log(this.jwtHelper.decodeToken(token)); // token
}
```
## What is Auth0?

@@ -278,2 +319,2 @@

This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info.
This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info.

@@ -21,17 +21,8 @@ import { Injectable, Inject } from '@angular/core';

JwtInterceptor.prototype.isWhitelistedDomain = function (request) {
var requestUrl;
try {
requestUrl = new URL(request.url);
return (this.whitelistedDomains.findIndex(function (domain) {
return typeof domain === 'string'
? domain === requestUrl.host
: domain instanceof RegExp ? domain.test(requestUrl.host) : false;
}) > -1);
}
catch (err) {
// if we're here, the request is made
// to the same domain as the Angular app
// so it's safe to proceed
return true;
}
var requestUrl = new URL(request.url);
return (this.whitelistedDomains.findIndex(function (domain) {
return typeof domain === 'string'
? domain === requestUrl.host
: domain instanceof RegExp ? domain.test(requestUrl.host) : false;
}) > -1);
};

@@ -38,0 +29,0 @@ JwtInterceptor.prototype.handleInterception = function (token, request, next) {

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