integ webcredentials
This commit is contained in:
parent
1bc043dd5e
commit
326b21a65c
@ -1 +1 @@
|
||||
const instance = axios.create({ baseURL: 'http://localhost:8083'});
|
||||
const instance = axios.create({ baseURL: 'http://localhost:8083', withCredentials: true});
|
@ -7,8 +7,9 @@ document.getElementById("signin").addEventListener("submit", function(evt){
|
||||
var password = document.getElementById("floatingPassword");
|
||||
if((password.value.length > 0) || (pseudo.value.length > 0)){
|
||||
authData = {username: pseudo.value, password: password.value}
|
||||
instance.post("token", {username: pseudo.value, password: password.value}, {headers: {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded' }}, { withCredentials: true})
|
||||
.then(function(response) { location.href="html/users.html"; })
|
||||
instance.post("token", {username: pseudo.value, password: password.value}, {headers: {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded' }})
|
||||
.then(function(response) {
|
||||
location.href="html/users.html"; })
|
||||
.catch(function(error){
|
||||
|
||||
switch (error.response.status){
|
||||
|
Loading…
x
Reference in New Issue
Block a user