{"action":"created","issue":{"url":"https://api.github.com/repos/http4s/http4s/issues/226","labels_url":"https://api.github.com/repos/http4s/http4s/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/http4s/http4s/issues/226/comments","events_url":"https://api.github.com/repos/http4s/http4s/issues/226/events","html_url":"https://github.com/http4s/http4s/issues/226","id":59888926,"number":226,"title":"OAuth2 bearer token BNF doesn't match spec?","user":{"login":"toby5box","id":10501574,"avatar_url":"https://avatars.githubusercontent.com/u/10501574?v=3","gravatar_id":"","url":"https://api.github.com/users/toby5box","html_url":"https://github.com/toby5box","followers_url":"https://api.github.com/users/toby5box/followers","following_url":"https://api.github.com/users/toby5box/following{/other_user}","gists_url":"https://api.github.com/users/toby5box/gists{/gist_id}","starred_url":"https://api.github.com/users/toby5box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toby5box/subscriptions","organizations_url":"https://api.github.com/users/toby5box/orgs","repos_url":"https://api.github.com/users/toby5box/repos","events_url":"https://api.github.com/users/toby5box/events{/privacy}","received_events_url":"https://api.github.com/users/toby5box/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-05T01:04:44Z","updated_at":"2015-05-10T21:29:32Z","closed_at":null,"body":"Ref. https://github.com/http4s/http4s/blob/master/core/src/main/scala/org/http4s/parser/AuthorizationHeader.scala#L65\r\nvs\r\nhttp://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html#authz-header\r\n\r\nIt seems that the http4s grammar would disallow Base64URL-encoded tokens, but Base64URL-encoded tokens are fundamental so specifications like that cited, and also JWS/JWT: https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-3.1\r\n\r\nOr have I missed something? (I'm also trying to find example patterns for implementing challenge/response for Bearer tokens)"},"comment":{"url":"https://api.github.com/repos/http4s/http4s/issues/comments/100703902","html_url":"https://github.com/http4s/http4s/issues/226#issuecomment-100703902","issue_url":"https://api.github.com/repos/http4s/http4s/issues/226","id":100703902,"user":{"login":"bryce-anderson","id":2948506,"avatar_url":"https://avatars.githubusercontent.com/u/2948506?v=3","gravatar_id":"","url":"https://api.github.com/users/bryce-anderson","html_url":"https://github.com/bryce-anderson","followers_url":"https://api.github.com/users/bryce-anderson/followers","following_url":"https://api.github.com/users/bryce-anderson/following{/other_user}","gists_url":"https://api.github.com/users/bryce-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/bryce-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryce-anderson/subscriptions","organizations_url":"https://api.github.com/users/bryce-anderson/orgs","repos_url":"https://api.github.com/users/bryce-anderson/repos","events_url":"https://api.github.com/users/bryce-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/bryce-anderson/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T21:29:32Z","updated_at":"2015-05-10T21:29:32Z","body":"Hi @toby5box, clearly this has been neglected: sorry about that.\r\n\r\nFirst things first, I believe the base64 alphabet is correct it is consistent with [rfc 4648](http://tools.ietf.org/html/rfc4648#section-4 ).\r\n\r\nThe reason it is matching the token is that definition of base64 is only used in ```BasicCredentialDef```. It is using the definition of ```Token```, found [here](https://github.com/http4s/http4s/blob/master/core/src/main/scala/org/http4s/parser/Rfc2616BasicRules.scala#L56). I also think that is wrong, particularly the ```'/'``` is missing.\r\n\r\nI'll poke around and maybe just implement the spec you linked. Have you had any problems, or has it just been working?"}}