-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add POST method for token validation requests #13
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
`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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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