oidc-client
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0-beta.5
{ | ||
"name": "oidc-client", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "OpenID Connect (OIDC) & OAuth2 client library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,4 +9,4 @@ // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
prepare() { | ||
let popup = new PopupWindow(); | ||
prepare(params) { | ||
let popup = new PopupWindow(params); | ||
return Promise.resolve(popup); | ||
@@ -13,0 +13,0 @@ } |
@@ -7,6 +7,8 @@ // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
const CheckForPopupClosedInterval = 500; | ||
const DefaultPopupFeatures = 'location=no,toolbar=no,width=500,height=500,left=100,top=100'; | ||
const DefaultPopupTarget = "_blank"; | ||
export default class PopupWindow { | ||
constructor() { | ||
constructor(params) { | ||
Log.info("PopupWindow.ctor"); | ||
@@ -21,4 +23,7 @@ | ||
window.addEventListener("message", this._boundMessageEvent, false); | ||
let features = params.popupWindowFeatures || DefaultPopupFeatures; | ||
let target = params.popupWindowTarget || DefaultPopupTarget; | ||
this._popup = window.open('', '_blank', 'location=no,toolbar=no,width=500,height=500'); | ||
this._popup = window.open('', target, features); | ||
if (this._popup) { | ||
@@ -25,0 +30,0 @@ Log.info("popup successfully created"); |
@@ -86,3 +86,7 @@ // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
return this._signin(args, this._popupNavigator, { startUrl: url }); | ||
return this._signin(args, this._popupNavigator, { | ||
startUrl: url, | ||
popupWindowFeatures : args.popupWindowFeatures || this.settings.popupWindowFeatures, | ||
popupWindowTarget : args.popupWindowTarget || this.settings.popupWindowTarget | ||
}); | ||
} | ||
@@ -154,3 +158,3 @@ signinPopupCallback(url) { | ||
return navigator.prepare().then(handle => { | ||
return navigator.prepare(navigatorParams).then(handle => { | ||
Log.info("got navigator window handle"); | ||
@@ -187,3 +191,3 @@ | ||
return navigator.prepare().then(handle => { | ||
return navigator.prepare(navigatorParams).then(handle => { | ||
Log.info("got navigator window handle"); | ||
@@ -190,0 +194,0 @@ |
@@ -12,2 +12,4 @@ // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. | ||
popup_redirect_uri, | ||
popupWindowFeatures, | ||
popupWindowTarget, | ||
silent_redirect_uri, | ||
@@ -20,2 +22,4 @@ automaticSilentRenew = false, | ||
this._popup_redirect_uri = popup_redirect_uri; | ||
this._popupWindowFeatures = popupWindowFeatures; | ||
this._popupWindowTarget = popupWindowTarget; | ||
this._silent_redirect_uri = silent_redirect_uri; | ||
@@ -29,2 +33,8 @@ this._automaticSilentRenew = !!automaticSilentRenew; | ||
} | ||
get popupWindowFeatures(){ | ||
return this._popupWindowFeatures; | ||
} | ||
get popupWindowTarget(){ | ||
return this._popupWindowTarget; | ||
} | ||
@@ -31,0 +41,0 @@ get silent_redirect_uri() { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
500396
3589