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

@equinor/fusion-framework-module-msal

Package Overview
Dependencies
Maintainers
3
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-framework-module-msal - npm Package Compare versions

Comparing version 0.1.1 to 0.1.6

49

CHANGELOG.md

@@ -6,2 +6,51 @@ # Change Log

## [0.1.6](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.5...@equinor/fusion-framework-module-msal@0.1.6) (2022-02-23)
### Bug Fixes
* deps ([2f2938b](https://github.com/equinor/fusion-framework/commit/2f2938b554610a068ed451623dd13480cae27302))
## [0.1.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.4...@equinor/fusion-framework-module-msal@0.1.5) (2022-02-23)
### Bug Fixes
* add missing deps ([d689a02](https://github.com/equinor/fusion-framework/commit/d689a025613401eadf693bdd52694ba462dcfea3))
## [0.1.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.3...@equinor/fusion-framework-module-msal@0.1.4) (2022-02-23)
**Note:** Version bump only for package @equinor/fusion-framework-module-msal
## [0.1.3](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.2...@equinor/fusion-framework-module-msal@0.1.3) (2022-02-23)
**Note:** Version bump only for package @equinor/fusion-framework-module-msal
## 0.1.2 (2022-02-23)
### Bug Fixes
* **module-msal:** auth client id check ([#27](https://github.com/equinor/fusion-framework/issues/27)) ([907460e](https://github.com/equinor/fusion-framework/commit/907460e3e63e777f6766dcc044cad7078d7ab747))
## 0.1.1 (2022-02-09)

@@ -8,0 +57,0 @@

2

client/package.json
{
"name": "@equinor/fusion-framework-module-http/client",
"name": "@equinor/fusion-framework-module-msal/client",
"types": "../dist/types/client/index.d.ts",

@@ -4,0 +4,0 @@ "main": "../dist/esm/client/index.js",

@@ -7,3 +7,3 @@ import { PublicClientApplication, } from '@azure/msal-browser';

const accounts = this.getAllAccounts();
return accounts.find((a) => (a.tenantId = this.tenantId));
return accounts.find((a) => a.idTokenClaims?.aud === this.clientId);
}

@@ -10,0 +10,0 @@ get clientId() {

@@ -22,3 +22,3 @@ import { AuthClient, AuthRequest } from './client';

}
export declare class AuthProvider {
export declare class AuthProvider implements IAuthProvider {
protected _config: IAuthConfigurator;

@@ -25,0 +25,0 @@ protected _clients: Record<string, AuthClient>;

{
"name": "@equinor/fusion-framework-module-msal",
"version": "0.1.1",
"version": "0.1.6",
"description": "",

@@ -36,3 +36,3 @@ "main": "./dist/esm/index.js",

},
"gitHead": "ca79b01fcc32c2c4e4aeea2f7c251fe9d91a2d04"
"gitHead": "075883ab8865523aef6a373e4aeccf1c54c095b4"
}

@@ -53,3 +53,3 @@ import {

const accounts = this.getAllAccounts();
return accounts.find((a) => (a.tenantId = this.tenantId));
return accounts.find((a) => (a.idTokenClaims as { aud: string })?.aud === this.clientId);
}

@@ -56,0 +56,0 @@

@@ -13,5 +13,24 @@ import { AuthClientConfig } from './client';

export interface IAuthConfigurator {
/**
* get default configuration for module
*/
readonly defaultConfig: AuthClientOptions | undefined;
/**
* Get named config by key
* @param name key for config
*/
getClientConfig(name: string): AuthClientOptions;
/**
* Create named config
* @param name key for config
* @param options config options
*/
configureClient(name: string, options: AuthClientOptions): AuthConfigurator;
/**
* Create default module config
* @param options config options
*/
configureDefault(options: AuthClientOptions): void;

@@ -21,2 +40,3 @@ }

export class AuthConfigurator implements IAuthConfigurator {
/** internal map of keyed configs */
protected _configs: Record<string, AuthClientOptions> = {};

@@ -23,0 +43,0 @@

@@ -0,1 +1,6 @@

/**
* [[include:module-msal/README.MD]]
* @module
*/
export * from './configurator';

@@ -2,0 +7,0 @@ export * from './provider';

@@ -23,14 +23,21 @@ import { AuthClient, createAuthClient, AuthRequest, ConsoleLogger } from './client';

getClient(name: string): AuthClient;
/**
* Create auth client by registered config name
* @param name name of configured client, default to defaultConfig {@link IAuthConfigurator.configureDefault}
*/
createClient(name?: string): AuthClient;
/**
* Acquire token from default auth client
* @param req Auth request options
*/
acquireToken(req: AuthRequest): ReturnType<AuthClient['acquireToken']>;
/**
* Acquire access token from default auth client
* @param req Auth request options
*/
acquireAccessToken(req: AuthRequest): Promise<string | undefined>;
/**

@@ -48,3 +55,3 @@ * Login to default auth client

export class AuthProvider {
export class AuthProvider implements IAuthProvider {
protected _clients: Record<string, AuthClient> = {};

@@ -51,0 +58,0 @@ get defaultClient(): AuthClient {

@@ -13,2 +13,5 @@ {

},
{
"path": "../module-http"
},

@@ -15,0 +18,0 @@ ],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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