Commit bbebf5be authored by Wolfgang's avatar Wolfgang

Switch login to POST to avoid password popping up in server logs. Closes #196

parent 0c2035a3
......@@ -68,7 +68,8 @@
<iron-ajax id="checkLogin" url="/exist/apps/tei-publisher/login"
handle-as="json" on-response="_handleResponse"
method="GET"></iron-ajax>
content-type="application/x-www-form-urlencoded"
method="POST"></iron-ajax>
</template>
<script>
......@@ -153,7 +154,7 @@
window.addEventListener('focus', () => {
if (!this._hasFocus) {
this._hasFocus = true;
this.$.checkLogin.params = null;
this.$.checkLogin.body = null;
this.$.checkLogin.generateRequest();
}
});
......@@ -166,7 +167,7 @@
_show(ev) {
ev.preventDefault();
if (this.loggedIn) {
this.$.checkLogin.params = {
this.$.checkLogin.body = {
logout: this.user
};
this.$.checkLogin.generateRequest();
......@@ -176,7 +177,7 @@
}
_confirmLogin() {
this.$.checkLogin.params = {
this.$.checkLogin.body = {
user: this.user,
password: this.password
};
......@@ -207,7 +208,7 @@
}
return true;
}
/**
* Fired on successful login.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment