{"action":"created","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/1094","repository_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/1094/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/1094/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/1094/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/1094","id":298045042,"number":1094,"title":"Basic Example with Postman?","user":{"login":"davidwparker","id":2379,"avatar_url":"https://avatars0.githubusercontent.com/u/2379?v=4","gravatar_id":"","url":"https://api.github.com/users/davidwparker","html_url":"https://github.com/davidwparker","followers_url":"https://api.github.com/users/davidwparker/followers","following_url":"https://api.github.com/users/davidwparker/following{/other_user}","gists_url":"https://api.github.com/users/davidwparker/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwparker/subscriptions","organizations_url":"https://api.github.com/users/davidwparker/orgs","repos_url":"https://api.github.com/users/davidwparker/repos","events_url":"https://api.github.com/users/davidwparker/events{/privacy}","received_events_url":"https://api.github.com/users/davidwparker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-17T23:24:41Z","updated_at":"2018-02-18T01:34:23Z","closed_at":"2018-02-18T01:34:23Z","author_association":"NONE","body":"Hello again,\r\n\r\nSorry, but I've been banging my head against this and figured I'd finally just ask.\r\n\r\nI have setup my rails-api app to be completely JSON based. I'm using Postman to test each API.\r\n\r\nI now have users, confirmations, sessions.\r\n\r\nI've created my first resource, and I've added `before_action :authenticate_user!` figuring that would Just Work. \r\n\r\nFor postman, the authorization methods they recommend don't align, so I've tried to do three different ways via headers or params, all to no avail.\r\n\r\n1. Set header = `Authorization` and then multiple fields in there (similar to this: https://github.com/lynndylanhurley/ng-token-auth#using-alternate-header-formats)\r\n2. Set headers for each thing individually (access-token, client, uid)\r\n3. Set each thing as a param (access-token, client, uid)\r\n\r\nBased on this, I would expect 2 or 3 to work:\r\nhttps://github.com/lynndylanhurley/devise_token_auth/blob/v0.1.42/app/controllers/devise_token_auth/concerns/set_user_by_token.rb#L19\r\n\r\nNote I'm using v0.1.42.\r\n\r\nUnfortunately, none of these seem to work. It seems to look up the user, then fails the rest of the chain.\r\n\r\nFor the data, I'm using the uid from the DB table, then within the JSON field for tokens, I take the client and token: `\"SOME_CLIENT\": { \"token\": \"SOME_TOKEN\" }`\r\n\r\nI'm sure I'm missing something small. \r\n\r\nThanks for the help!"},"comment":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/comments/366485401","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/1094#issuecomment-366485401","issue_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/1094","id":366485401,"user":{"login":"davidwparker","id":2379,"avatar_url":"https://avatars0.githubusercontent.com/u/2379?v=4","gravatar_id":"","url":"https://api.github.com/users/davidwparker","html_url":"https://github.com/davidwparker","followers_url":"https://api.github.com/users/davidwparker/followers","following_url":"https://api.github.com/users/davidwparker/following{/other_user}","gists_url":"https://api.github.com/users/davidwparker/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwparker/subscriptions","organizations_url":"https://api.github.com/users/davidwparker/orgs","repos_url":"https://api.github.com/users/davidwparker/repos","events_url":"https://api.github.com/users/davidwparker/events{/privacy}","received_events_url":"https://api.github.com/users/davidwparker/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T01:34:23Z","updated_at":"2018-02-18T01:34:23Z","author_association":"NONE","body":"@zachfeldman - yes, I looked at the example on ng-auth-token. As it turned out, I answered my own question (using the token-hash instead of the token). I'm not sure why Postman wasn't returning it ❓ but manually creating the token in console, grabbing the bcrypt password token-hash, and saving that (after turning off updates on requests) and I'm able to use that manually / easily. \r\n\r\nThanks!"}}
{"actor":{"display_login":"davidwparker"}}