Reputation: 116050
The bearer token spec is the one I have a question about. I'm trying to figure out what characters are allowed in the token when placed in the Authorization: OAuth ......
header. Here's what the spec says
credentials = "OAuth2" RWS access-token [ RWS 1#auth-param ]
access-token = 1*( quoted-char / <"> )quoted-char = "!" / "#" / "$" / "%" / "&" / "'" / "(" / ")" / "*" / "+" / "-" / "." / "/" / DIGIT / ":" / "<" / "=" / ">" / "?" / "@" / ALPHA / "[" / "]" / "^" / "_" / "`" / "{" / "|" / "}" / "~" / "" / "," / ";"
I'm not sure how to read this. I'm new at reading RFC's so if someone could explain it I would appreciate it.
Upvotes: 2
Views: 211
Reputation: 958
You can simply use Base64 encode.
It doesn't use some of characters (ex. "!", "#"..) in the BNF though.
If you want to know all allowed characters,
"!" / "#" / "$" / "%" means all these characters ("!", "#", "$", "%") are allowed.
Upvotes: 0
Reputation: 1609
It looks like it's augmented BNF from the HTTP/1.1 spec (RFC2616):
Upvotes: 1