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

angular-oauth2-oidc

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-oauth2-oidc - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

dist/index.metadata.json

30

dist/index.js
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
function __export(m) {

@@ -27,12 +18,13 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

};
OAuthModule = __decorate([
core_1.NgModule({
imports: [
common_1.CommonModule
],
declarations: [],
exports: []
}),
__metadata('design:paramtypes', [])
], OAuthModule);
OAuthModule.decorators = [
{ type: core_1.NgModule, args: [{
imports: [
common_1.CommonModule
],
declarations: [],
exports: []
},] },
];
/** @nocollapse */
OAuthModule.ctorParameters = function () { return []; };
return OAuthModule;

@@ -39,0 +31,0 @@ }());

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var js_base64_1 = require('js-base64');

@@ -269,2 +260,3 @@ var base64_js_1 = require('base64-js');

OAuthService.prototype.processIdToken = function (idToken, accessToken) {
var _this = this;
var tokenParts = idToken.split(".");

@@ -275,6 +267,14 @@ var claimsBase64 = this.padBase64(tokenParts[1]);

var savedNonce = this._storage.getItem("nonce");
if (claims.aud !== this.clientId) {
console.warn("Wrong audience: " + claims.aud);
return false;
if (Array.isArray(claims.aud)) {
if (claims.aud.every(function (v) { return v !== _this.clientId; })) {
console.warn("Wrong audience: " + claims.aud.join(","));
return false;
}
}
else {
if (claims.aud !== this.clientId) {
console.warn("Wrong audience: " + claims.aud);
return false;
}
}
if (this.issuer && claims.iss !== this.issuer) {

@@ -470,6 +470,9 @@ console.warn("Wrong issuer: " + claims.iss);

};
OAuthService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [http_1.Http])
], OAuthService);
OAuthService.decorators = [
{ type: core_1.Injectable },
];
/** @nocollapse */
OAuthService.ctorParameters = function () { return [
{ type: http_1.Http, },
]; };
return OAuthService;

@@ -476,0 +479,0 @@ }());

{
"name": "angular-oauth2-oidc",
"version": "1.0.16",
"version": "1.0.17",
"scripts": {
"lint": "tslint src/**/*.ts",
"test": "tsc && karma start",
"prepublish": "tsc",
"tsc": "tsc"
"prepublish": "ngc",
"tsc": "tsc",
"ngc": "ngc"
},

@@ -10,0 +11,0 @@ "repository": {

@@ -341,5 +341,12 @@ import {Base64} from 'js-base64';

if (claims.aud !== this.clientId) {
console.warn("Wrong audience: " + claims.aud);
return false;
if (Array.isArray(claims.aud)) {
if (claims.aud.every(v => v !== this.clientId)) {
console.warn("Wrong audience: " + claims.aud.join(","));
return false;
}
} else {
if (claims.aud !== this.clientId) {
console.warn("Wrong audience: " + claims.aud);
return false;
}
}

@@ -346,0 +353,0 @@

Sorry, the diff of this file is not supported yet

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