{"action":"closed","issue":{"url":"https://api.github.com/repos/rheinfabrik/Heimdall.swift/issues/58","labels_url":"https://api.github.com/repos/rheinfabrik/Heimdall.swift/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/rheinfabrik/Heimdall.swift/issues/58/comments","events_url":"https://api.github.com/repos/rheinfabrik/Heimdall.swift/issues/58/events","html_url":"https://github.com/rheinfabrik/Heimdall.swift/issues/58","id":87339911,"number":58,"title":"succeeded but returns error anyway","user":{"login":"MarvinNazari","id":926772,"avatar_url":"https://avatars.githubusercontent.com/u/926772?v=3","gravatar_id":"","url":"https://api.github.com/users/MarvinNazari","html_url":"https://github.com/MarvinNazari","followers_url":"https://api.github.com/users/MarvinNazari/followers","following_url":"https://api.github.com/users/MarvinNazari/following{/other_user}","gists_url":"https://api.github.com/users/MarvinNazari/gists{/gist_id}","starred_url":"https://api.github.com/users/MarvinNazari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarvinNazari/subscriptions","organizations_url":"https://api.github.com/users/MarvinNazari/orgs","repos_url":"https://api.github.com/users/MarvinNazari/repos","events_url":"https://api.github.com/users/MarvinNazari/events{/privacy}","received_events_url":"https://api.github.com/users/MarvinNazari/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T13:06:03Z","updated_at":"2015-06-11T14:24:16Z","closed_at":"2015-06-11T14:24:16Z","body":"Hi, i send a request to my server and i get the access_token back, but in the requestAccessToken block i get .Failure result, here is my code\r\n\r\n    let credentials = OAuthClientCredentials(id: \"ede4499a639710a0b5107b7b00df3cece194114871f2add64f3cd93a9418a197\", secret: \"4045de00ec7505f0f8e980aa063311dc8118f1bfdb7e5d160fa35eea60ee6ab5\")\r\n    \r\n    \r\n    let tokenURL = NSURL(string: \"http://localhost:3000/oauth/token\")!\r\n    let heimdall = Heimdall(tokenURL: tokenURL, credentials: credentials)\r\n    \r\n    heimdall.requestAccessToken(username: username, password: password) { result in\r\n        switch result {\r\n        case .Success:\r\n            println(\"success\")\r\n        case .Failure(let error):\r\n            println(\"failure: \\(error)\")\r\n        }\r\n    }\r\n\r\n\r\nand i get back this\r\n\r\n    failure: Error Domain=HeimdallErrorDomain Code=1 \"Could not authorize grant\" UserInfo=0x7fb86481cd40 {NSLocalizedDescription=Could not authorize grant, NSLocalizedFailureReason=Expected access token, got: {\"access_token\":\"a0752d03bd4ac7200f0cd739f1a411df1885d47f24a3ab1c6b216c435a199847\",\"token_type\":\"bearer\",\"scope\":\"public\",\"created_at\":1434027186}.}\r\n\r\nthanks in advance"}}