{"action":"created","issue":{"url":"https://api.github.com/repos/dongri/OAuthSwift/issues/94","labels_url":"https://api.github.com/repos/dongri/OAuthSwift/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/dongri/OAuthSwift/issues/94/comments","events_url":"https://api.github.com/repos/dongri/OAuthSwift/issues/94/events","html_url":"https://github.com/dongri/OAuthSwift/issues/94","id":101602597,"number":94,"title":"credential.auth2 variable is not automatically set to 'true' when using OAuth2Swift","user":{"login":"twistify","id":2138037,"avatar_url":"https://avatars.githubusercontent.com/u/2138037?v=3","gravatar_id":"","url":"https://api.github.com/users/twistify","html_url":"https://github.com/twistify","followers_url":"https://api.github.com/users/twistify/followers","following_url":"https://api.github.com/users/twistify/following{/other_user}","gists_url":"https://api.github.com/users/twistify/gists{/gist_id}","starred_url":"https://api.github.com/users/twistify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twistify/subscriptions","organizations_url":"https://api.github.com/users/twistify/orgs","repos_url":"https://api.github.com/users/twistify/repos","events_url":"https://api.github.com/users/twistify/events{/privacy}","received_events_url":"https://api.github.com/users/twistify/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-18T08:43:35Z","updated_at":"2015-08-18T08:57:55Z","closed_at":null,"body":"the `oauth2` variable in `OAuthSwiftCredential` does not get set to `true` when authorizing with OAuth2.  This means that the client does not use oauth2 headers (`request.headers = [\"Authorization\": \"Bearer \\(self.credential.oauth_token)\"]`) when making network requests.\r\n\r\nWhile this can be worked around by explicitly setting the `oauth2` variable to `true`, shouldn't this happen by default??"},"comment":{"url":"https://api.github.com/repos/dongri/OAuthSwift/issues/comments/132125094","html_url":"https://github.com/dongri/OAuthSwift/issues/94#issuecomment-132125094","issue_url":"https://api.github.com/repos/dongri/OAuthSwift/issues/94","id":132125094,"user":{"login":"phimage","id":8875768,"avatar_url":"https://avatars.githubusercontent.com/u/8875768?v=3","gravatar_id":"","url":"https://api.github.com/users/phimage","html_url":"https://github.com/phimage","followers_url":"https://api.github.com/users/phimage/followers","following_url":"https://api.github.com/users/phimage/following{/other_user}","gists_url":"https://api.github.com/users/phimage/gists{/gist_id}","starred_url":"https://api.github.com/users/phimage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phimage/subscriptions","organizations_url":"https://api.github.com/users/phimage/orgs","repos_url":"https://api.github.com/users/phimage/repos","events_url":"https://api.github.com/users/phimage/events{/privacy}","received_events_url":"https://api.github.com/users/phimage/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T08:57:55Z","updated_at":"2015-08-18T08:57:55Z","body":"The variable is set to `true` when token is filled\r\n```swift\r\nself.client.credential.oauth_token = accessToken\r\nself.client.credential.oauth2 = true\r\nsuccess(credential: self.client.credential, response: response, parameters: responseParameters)\r\n```\r\n\r\nAre you talking about a scenario where you fill manually an old token?\r\nIn this case, you must set to `true` the `oauth2` variable ;(\r\n\r\nIf not how you achieve this?"}}