{"action":"created","issue":{"url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/9","labels_url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/9/comments","events_url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/9/events","html_url":"https://github.com/ging/fiware-pep-proxy/issues/9","id":105841414,"number":9,"title":"User toker not authorized","user":{"login":"j99ht","id":13207577,"avatar_url":"https://avatars.githubusercontent.com/u/13207577?v=3","gravatar_id":"","url":"https://api.github.com/users/j99ht","html_url":"https://github.com/j99ht","followers_url":"https://api.github.com/users/j99ht/followers","following_url":"https://api.github.com/users/j99ht/following{/other_user}","gists_url":"https://api.github.com/users/j99ht/gists{/gist_id}","starred_url":"https://api.github.com/users/j99ht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j99ht/subscriptions","organizations_url":"https://api.github.com/users/j99ht/orgs","repos_url":"https://api.github.com/users/j99ht/repos","events_url":"https://api.github.com/users/j99ht/events{/privacy}","received_events_url":"https://api.github.com/users/j99ht/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ging/fiware-pep-proxy/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"garcianavalon","id":1436781,"avatar_url":"https://avatars.githubusercontent.com/u/1436781?v=3","gravatar_id":"","url":"https://api.github.com/users/garcianavalon","html_url":"https://github.com/garcianavalon","followers_url":"https://api.github.com/users/garcianavalon/followers","following_url":"https://api.github.com/users/garcianavalon/following{/other_user}","gists_url":"https://api.github.com/users/garcianavalon/gists{/gist_id}","starred_url":"https://api.github.com/users/garcianavalon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garcianavalon/subscriptions","organizations_url":"https://api.github.com/users/garcianavalon/orgs","repos_url":"https://api.github.com/users/garcianavalon/repos","events_url":"https://api.github.com/users/garcianavalon/events{/privacy}","received_events_url":"https://api.github.com/users/garcianavalon/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-09-10T16:02:31Z","updated_at":"2015-09-11T12:14:11Z","closed_at":"2015-09-11T12:14:11Z","body":"Hi,\r\n\r\nI have deployed wilma and idm in two different servers.\r\n\r\nFollowing documentation, my application asked for a code to IDM that is used in PEP Proxy access to get the token. Please see below\r\n\r\n[Thu Sep 10 15:52:14 2015] [error] DEBUG:idm_logger:API_KEYSTONE: POST to http://127.0.0.1:5000/v3/OS-OAUTH2/access_token with body redirect_uri=http://www.google.com&grant_type=authorization_code&code=ohcIKEnZ3ZnjhpQzZqz1h8Phzff76B and headers {'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic ZTkwNjJiNGFlNTNlNDY2YmEwOGEwZGRmZDk2NGJkYzc6ZTEwNzkyMDMyODMxNDk0NGFhZGZlZTI5ZTNjYjFiNGU='}\r\n\r\ncurl -X POST -v http://127.0.0.1/oauth2/token \\\r\n     -u \"e9062b4ae53e466ba08a0ddfd964bdc7:e107920328314944aadfee29e3cb1b4e\" \\\r\n     -d \"redirect_uri=http://www.google.com\" \\\r\n     -d \"grant_type=authorization_code\" \\\r\n     -d \"code=ohcIKEnZ3ZnjhpQzZqz1h8Phzff76B\"\r\n\r\n* Closing connection #0\r\n{\"access_token\": \"0xDy1ebB13V1VNJ35boJkBdjxwrmgE\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"state\": \"xyz\", \"scope\": \"all_info\", \"refresh_token\": \"d0tmVk5TJXeNiZuI996ipwQWKqfocl\"}\r\n\r\nAnd this token is used to access to PEP Proxy\r\ncurl --header \"X-Auth-Token: d0tmVk5TJXeNiZuI996ipwQWKqfocl\" http://localhost\r\n\r\nBut the answer is \r\n[TOKEN] Checking token with IDM...\r\nUser access-token not authorized\r\n\r\nThis is my config.js\r\n\r\nconfig.account_host = 'http://192.168.90.20';\r\n\r\nconfig.keystone_host = '192.168.90.20';\r\nconfig.keystone_port = 5000;\r\n\r\nconfig.app_host = '92.222.171.203';\r\nconfig.app_port = '80';\r\n\r\nconfig.username = 'pepproxy';\r\nconfig.password = 'pepproxy';\r\nconfig.check_permissions = false;\r\n\r\n\r\n// options: oauth2/keystone\r\nconfig.tokens_engine = 'oauth2';\r\n\r\nDo you have any idea about what could be wrong?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/comments/139530917","html_url":"https://github.com/ging/fiware-pep-proxy/issues/9#issuecomment-139530917","issue_url":"https://api.github.com/repos/ging/fiware-pep-proxy/issues/9","id":139530917,"user":{"login":"garcianavalon","id":1436781,"avatar_url":"https://avatars.githubusercontent.com/u/1436781?v=3","gravatar_id":"","url":"https://api.github.com/users/garcianavalon","html_url":"https://github.com/garcianavalon","followers_url":"https://api.github.com/users/garcianavalon/followers","following_url":"https://api.github.com/users/garcianavalon/following{/other_user}","gists_url":"https://api.github.com/users/garcianavalon/gists{/gist_id}","starred_url":"https://api.github.com/users/garcianavalon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garcianavalon/subscriptions","organizations_url":"https://api.github.com/users/garcianavalon/orgs","repos_url":"https://api.github.com/users/garcianavalon/repos","events_url":"https://api.github.com/users/garcianavalon/events{/privacy}","received_events_url":"https://api.github.com/users/garcianavalon/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T12:14:11Z","updated_at":"2015-09-11T12:14:11Z","body":"Refresh token is a long lasting credential that allows you to obtain a new access token once the first one is expired with out needing to go through the whole OAuth2.0 flow again. It has a validity of around 2 weeks and once used to obtain a new access token is invalidated. You should keep it secret ;)\r\n\r\nI'm glad its working, I'll close the issue then.\r\nBest regards,\r\nEnrique"}}