Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .factory('AuthenticationService', function($rootScope, $http, authService, $httpBackend) {
- var service = {
- login: function(user) {
- $http.post('http://192.168.100.100/foosync/login', { user: user }, { ignoreAuthModule: true })
- .success(function (data, status, headers, config) {
- $http.defaults.headers.common.Authorization = data.authorizationToken;
- console.log("token:" + data.authorizationToken);
- authService.loginConfirmed(data, function(config) {
- config.headers.Authorization = data.authorizationToken;
- return config;
- });
- })
- General
- **Remote Address:** 192.168.100.100:80
- **Request URL:** http://192.168.100.100/myapp/login
- **Request Method:** OPTIONS
- **Status Code:** 404 Not Found
- Response Headers
- **Access-Control-Allow-Origin:** *
- **Cache-Control:** no-cache, must-revalidate
- **Connection:** Keep-Alive
- **Content-Encoding:** gzip
- **Content-Length:** 563
- **Content-Type:** text/plain
- **Date:** Tue, 04 Aug 2015 04:29:14 GMT
- **Expires:** 0
- **Keep-Alive:** timeout=5, max=100
- **Server:** Apache/2.2.22 (Debian)
- **Vary:** Accept-Encoding
- **X-Powered-By:** PHP/5.4.41-0+deb7u1
- Request Headers
- OPTIONS /foosync/login HTTP/1.1
- **Host:** 192.168.100.100
- **Connection:** keep-alive
- **Access-Control-Request-Method:** POST
- **Origin:** null
- **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
- **Access-Control-Request-Headers:** authorization, content-type
- **Accept:** */*
- **Accept-Encoding:** gzip, deflate, sdch
- **Accept-Language:** en-US,en;q=0.8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement