[New] Allow to pass password-encoding which is sent with the request
This commit is contained in:
parent
ab543c8451
commit
e792d1a9ae
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "strolch-wc-auth",
|
"name": "strolch-wc-auth",
|
||||||
"description": "Strolch WebComponent Auth",
|
"description": "Strolch WebComponent Auth",
|
||||||
"version": "0.7.2",
|
"version": "0.7.3",
|
||||||
"authors": ["Robert von Burg"],
|
"authors": ["Robert von Burg"],
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"strolch",
|
"strolch",
|
||||||
|
|
|
@ -200,7 +200,9 @@
|
||||||
type: String,
|
type: String,
|
||||||
value: './locales.json'
|
value: './locales.json'
|
||||||
},
|
},
|
||||||
|
passwordEncoding: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
appTitle: {
|
appTitle: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
@ -313,8 +315,9 @@
|
||||||
};
|
};
|
||||||
this.dlgTitle = this.localize('authenticationFailed');
|
this.dlgTitle = this.localize('authenticationFailed');
|
||||||
this.$.ajaxAuth.body = {
|
this.$.ajaxAuth.body = {
|
||||||
'username': this.username,
|
username: this.username,
|
||||||
'password': btoa(unescape(encodeURIComponent(this.password)))
|
password: btoa(unescape(encodeURIComponent(this.password))),
|
||||||
|
encoding: this.passwordEncoding
|
||||||
};
|
};
|
||||||
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication';
|
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication';
|
||||||
this.$.ajaxAuth.method = 'POST';
|
this.$.ajaxAuth.method = 'POST';
|
||||||
|
@ -361,8 +364,8 @@
|
||||||
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication/challenge';
|
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication/challenge';
|
||||||
this.$.ajaxAuth.method = 'POST';
|
this.$.ajaxAuth.method = 'POST';
|
||||||
this.$.ajaxAuth.body = {
|
this.$.ajaxAuth.body = {
|
||||||
'username': this.username,
|
username: this.username,
|
||||||
'usage': 'set-password'
|
usage: 'set-password'
|
||||||
};
|
};
|
||||||
this.$.ajaxAuth.generateRequest();
|
this.$.ajaxAuth.generateRequest();
|
||||||
},
|
},
|
||||||
|
@ -385,8 +388,8 @@
|
||||||
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication/challenge';
|
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/authentication/challenge';
|
||||||
this.$.ajaxAuth.method = 'PUT';
|
this.$.ajaxAuth.method = 'PUT';
|
||||||
this.$.ajaxAuth.body = {
|
this.$.ajaxAuth.body = {
|
||||||
'username': this.username,
|
username: this.username,
|
||||||
'challenge': this.code
|
challenge: this.code
|
||||||
};
|
};
|
||||||
this.$.ajaxAuth.generateRequest();
|
this.$.ajaxAuth.generateRequest();
|
||||||
},
|
},
|
||||||
|
@ -415,7 +418,8 @@
|
||||||
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/privilege/users/' + this.username + '/password';
|
this.$.ajaxAuth.url = this.basePath + 'rest/strolch/privilege/users/' + this.username + '/password';
|
||||||
this.$.ajaxAuth.method = 'PUT';
|
this.$.ajaxAuth.method = 'PUT';
|
||||||
this.$.ajaxAuth.body = {
|
this.$.ajaxAuth.body = {
|
||||||
'password': btoa(unescape(encodeURIComponent(this.password1)))
|
password: btoa(unescape(encodeURIComponent(this.password1))),
|
||||||
|
encoding: this.passwordEncoding
|
||||||
};
|
};
|
||||||
this.$.ajaxAuth.generateRequest();
|
this.$.ajaxAuth.generateRequest();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue