Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. .factory('AuthenticationService', function($rootScope, $http, authService, $httpBackend) {
  2. var service = {
  3. login: function(user) {
  4. $http.post('http://192.168.100.100/foosync/login', { user: user }, { ignoreAuthModule: true })
  5. .success(function (data, status, headers, config) {
  6. $http.defaults.headers.common.Authorization = data.authorizationToken;
  7. console.log("token:" + data.authorizationToken);
  8. authService.loginConfirmed(data, function(config) {
  9. config.headers.Authorization = data.authorizationToken;
  10. return config;
  11. });
  12. })
  13.  
  14. General
  15.  
  16. **Remote Address:** 192.168.100.100:80
  17. **Request URL:** http://192.168.100.100/myapp/login
  18. **Request Method:** OPTIONS
  19. **Status Code:** 404 Not Found
  20.  
  21. Response Headers
  22.  
  23. **Access-Control-Allow-Origin:** *
  24. **Cache-Control:** no-cache, must-revalidate
  25. **Connection:** Keep-Alive
  26. **Content-Encoding:** gzip
  27. **Content-Length:** 563
  28. **Content-Type:** text/plain
  29. **Date:** Tue, 04 Aug 2015 04:29:14 GMT
  30. **Expires:** 0
  31. **Keep-Alive:** timeout=5, max=100
  32. **Server:** Apache/2.2.22 (Debian)
  33. **Vary:** Accept-Encoding
  34. **X-Powered-By:** PHP/5.4.41-0+deb7u1
  35.  
  36. Request Headers
  37.  
  38. OPTIONS /foosync/login HTTP/1.1
  39. **Host:** 192.168.100.100
  40. **Connection:** keep-alive
  41. **Access-Control-Request-Method:** POST
  42. **Origin:** null
  43. **User-Agent:** Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
  44. **Access-Control-Request-Headers:** authorization, content-type
  45. **Accept:** */*
  46. **Accept-Encoding:** gzip, deflate, sdch
  47. **Accept-Language:** en-US,en;q=0.8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement