utils: add getOpenIDRedirectionAuthorization: to avoid code-duplication
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
665b206b0f
commit
e8c60b3215
10
src/Utils.js
10
src/Utils.js
@ -279,6 +279,16 @@ utilities: {
|
||||
window.localStorage.removeItem("ProxmoxUser");
|
||||
},
|
||||
|
||||
// The End-User gets redirected back here after login on the OpenID auth. portal, and in the
|
||||
// redirection URL the state and auth.code are passed as URL GET params, this helper parses those
|
||||
getOpenIDRedirectionAuthorization: function() {
|
||||
const auth = Ext.Object.fromQueryString(window.location.search);
|
||||
if (auth.state !== undefined && auth.code !== undefined) {
|
||||
return auth;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
|
||||
// comp.setLoading() is buggy in ExtJS 4.0.7, so we
|
||||
// use el.mask() instead
|
||||
setErrorMask: function(comp, msg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user