New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-msal

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-msal - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

2

package.json
{
"name": "cordova-plugin-msal",
"version": "2.1.1",
"version": "2.1.2",
"description": "A Cordova plugin providing a wrapper for Microsoft's MSAL library for Android and iOS.",

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

@@ -1,68 +0,64 @@

cordova.define("cordova-plugin-msal.msalPlugin", function(require, exports, module) {
module.exports = {
msalInit: function(successCallback, errorCallback, options) {
var defaultOptions = {
authorities: [
{
type: 'AAD',
audience: 'AzureADandPersonalMicrosoftAccount',
authorityUrl: '',
cloudInstance: 'MSALAzurePublicCloudInstance',
default: true
}
],
authorizationUserAgent: 'DEFAULT',
multipleCloudsSupported: false,
brokerRedirectUri: false,
accountMode: 'SINGLE',
scopes: ['User.Read']
}
if (!options) {
options = defaultOptions;
} else {
if (typeof(options.authorities) == 'undefined') {
options.authorities = defaultOptions.authorities;
module.exports = {
msalInit: function(successCallback, errorCallback, options) {
var defaultOptions = {
authorities: [
{
type: 'AAD',
audience: 'AzureADandPersonalMicrosoftAccount',
authorityUrl: '',
cloudInstance: 'MSALAzurePublicCloudInstance',
default: true
}
if (typeof(options.authorizationUserAgent) == 'undefined') {
options.authorizationUserAgent = defaultOptions.authorizationUserAgent;
}
if (typeof(options.multipleCloudsSupported) == 'undefined') {
options.multipleCloudsSupported = defaultOptions.multipleCloudsSupported;
}
if (typeof(options.brokerRedirectUri) == 'undefined') {
options.brokerRedirectUri = defaultOptions.brokerRedirectUri;
}
if (typeof(options.accountMode) == 'undefined') {
options.accountMode = defaultOptions.accountMode;
}
if (typeof(options.scopes) == 'undefined') {
options.scopes = defaultOptions.scopes;
}
],
authorizationUserAgent: 'DEFAULT',
multipleCloudsSupported: false,
brokerRedirectUri: false,
accountMode: 'SINGLE',
scopes: ['User.Read']
}
if (!options) {
options = defaultOptions;
} else {
if (typeof(options.authorities) == 'undefined') {
options.authorities = defaultOptions.authorities;
}
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'msalInit', [JSON.stringify(options)]);
},
getAccounts: function(successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'getAccounts', []);
},
signInSilent: function(successCallback, errorCallback, account) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signInSilent', [account]);
},
signInInteractive: function(successCallback, errorCallback, signInOptions) {
if (typeof(signInOptions) === 'undefined') {
signInOptions = {};
if (typeof(options.authorizationUserAgent) == 'undefined') {
options.authorizationUserAgent = defaultOptions.authorizationUserAgent;
}
var opts = [
typeof(signInOptions.loginHint !== 'undefined') ? signInOptions.loginHint : '',
typeof(signInOptions.prompt !== 'undefined') ? signInOptions.prompt : '',
typeof(signInOptions.authorizationQueryStringParameters) !== 'undefined' ? signInOptions.authorizationQueryStringParameters : [],
typeof(signInOptions.otherScopesToAuthorize) !== 'undefined' ? signInOptions.otherScopesToAuthorize : []
];
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signInInteractive', opts);
},
signOut: function(successCallback, errorCallback, account) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signOut', [account]);
if (typeof(options.multipleCloudsSupported) == 'undefined') {
options.multipleCloudsSupported = defaultOptions.multipleCloudsSupported;
}
if (typeof(options.brokerRedirectUri) == 'undefined') {
options.brokerRedirectUri = defaultOptions.brokerRedirectUri;
}
if (typeof(options.accountMode) == 'undefined') {
options.accountMode = defaultOptions.accountMode;
}
if (typeof(options.scopes) == 'undefined') {
options.scopes = defaultOptions.scopes;
}
}
};
});
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'msalInit', [JSON.stringify(options)]);
},
getAccounts: function(successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'getAccounts', []);
},
signInSilent: function(successCallback, errorCallback, account) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signInSilent', [account]);
},
signInInteractive: function(successCallback, errorCallback, signInOptions) {
if (typeof(signInOptions) === 'undefined') {
signInOptions = {};
}
var opts = [
typeof(signInOptions.loginHint !== 'undefined') ? signInOptions.loginHint : '',
typeof(signInOptions.prompt !== 'undefined') ? signInOptions.prompt : '',
typeof(signInOptions.authorizationQueryStringParameters) !== 'undefined' ? signInOptions.authorizationQueryStringParameters : [],
typeof(signInOptions.otherScopesToAuthorize) !== 'undefined' ? signInOptions.otherScopesToAuthorize : []
];
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signInInteractive', opts);
},
signOut: function(successCallback, errorCallback, account) {
cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'signOut', [account]);
}
};

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