Guest User

Untitled

a guest
Mar 22nd, 2018
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. public login(credentials): Observable<Object> {
  2. let httpParams = this.httpParams;
  3. for (let key in credentials){ httpParams = httpParams.set(key, credentials[key])};
  4. return this.httpClient.post(this.url + this.loginEndpoint, httpParams, { withCredentials: true });
  5. }
  6.  
  7. this.authServiceProvider.login({username: this.username, password: this.password}).subscribe(data => {
  8. <display logged in page>
  9. });
  10.  
  11. access-control-allow-credentials: true
  12. access-control-allow-headers: origin, x-requested-with, content-type
  13. access-control-allow-origin: http://localhost:8100
  14. content-encoding: gzip
  15. content-length: 95
  16. content-type: text/javascript
  17. date: Wed, 21 Mar 2018 15:55:50 GMT
  18. server: Apache-Coyote/1.1
  19. set-cookie: JSESSIONID=BE1997D948436D29A90DA24DC518E29F; Path=/api/; HttpOnly
  20. status: 200
  21. vary: Origin,Accept-Encoding
  22.  
  23. :authority: api.com
  24. :method: POST
  25. :path: /api/login.jsp
  26. :scheme: https
  27. accept: application/json, text/plain, */*
  28. accept-encoding: gzip, deflate, br
  29. accept-language: en-US,en;q=0.9
  30. content-length: 283
  31. content-type: application/x-www-form-urlencoded;charset=UTF-8
  32. cookie: JSESSIONID=BE1997D948436D29A90DA24DC518E29F; _ga=GA1.2.744976386.1521627198; _gid=GA1.2.533597894.1521627198
  33. origin: http://localhost:8100
  34. referer: http://localhost:8100/?ionicplatform=android&http://localhost:8100/ionic-lab
  35. user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
  36.  
  37. Referer: http://localhost:8100/?ionicplatform=android&http://localhost:8100/ionic-lab
  38. Content-Type: application/x-www-form-urlencoded;charset=UTF-8
  39. Origin: http://localhost:8100
  40. Host: api.com
  41. Accept: application/json, text/plain, */*
  42. Connection: keep-alive
  43. Accept-Language: en-us
  44. Accept-Encoding: br, gzip, deflate
  45. Content-Length: 283
  46. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7
  47.  
  48. Referer: http://localhost:8100/?ionicplatform=android&http://localhost:8100/ionic-lab
  49. Content-Type: application/x-www-form-urlencoded;charset=UTF-8
  50. Origin: http://localhost:8100
  51. Host: api.com
  52. Accept: application/json, text/plain, */*
  53. Connection: keep-alive
  54. Accept-Language: en-us
  55. Accept-Encoding: br, gzip, deflate
  56. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7
  57. Cookie: JSESSIONID=32D79DD5171A6B82783252CE22E55083
  58. Content-Length: 283
Add Comment
Please, Sign In to add comment