add POST method for token validation requests#13
add POST method for token validation requests#13Maxime2 wants to merge 4 commits intoCyberDem0n:masterfrom
Conversation
| `Content-Type: application/x-www-form-urlencoded` header and moves CGI parameters from `<tokeninfo url>` into request body. | ||
| If this parameter is omitted, the GET method is used. | ||
|
|
||
| Optional parameter `:<Authz payload>` specify a payload for `Authorization` HTTP header, e.g. `:dXNlcjpwYXNzd29yZA==` will result |
There was a problem hiding this comment.
Hmm. Should it maybe be more explicit?
Something like:
[Authorization: Basic dXNlcjpwYXNzd29yZA=]
So that it will be possible to also use:
[Authorization: Bearer xyzabcd]
And check for Authorization: prefix instead of just ':'.
According to the pam docs square brackets are needed if argument include space.
There was a problem hiding this comment.
Sorry, I forgot about other authorization schemes that can be used :)
Perhaps if we go with the following syntax:
:<authorisation scheme>:<authorisation payload>
e.g.
:Bearer:xyzabcd
it would be more compact and nice looking. The square brackets would be needed only if the authorisation payload includes spaces.
There was a problem hiding this comment.
IMO, it is better to be explicit.
Someone who will have to maintain the configuration would easier understand what is happening just from the first sight if the argument looks exactly as in HTTP header.
There was a problem hiding this comment.
The person who have to maintain the configuration will rather be following a defined operational procedure, anyone else will just read the docs. Making it looks like a HTTP header may give a false impression that any other HTTP header can be inserted which is not true.
I have added support for authorisation scheme. Feel free to change it any way you like.
Closes #8