Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login = () => {
- return axios({
- method: 'post',
- url: `https://${this.login.credentials.apiUrl}/restful/u/login`,
- headers: {
- 'Content-Type': 'application/json',
- },
- data: {
- username: this.login.credentials.user,
- password: this.login.credentials.password
- },
- withCredentials: true,
- })
- };
- logout = () => {
- return axios({
- method: 'post',
- url: `https://${this.login.credentials.apiUrl}/restful/u/logout`,
- headers: Object.assign(
- {},
- this.login.requestHeaders, // CSRF-token
- {'Content-Type': 'application/json'}
- ),
- withCredentials: true
- })
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement