Skip to content
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

Authorization-Tokens are not well documented. #44

Open
tayler6000 opened this issue Mar 15, 2023 · 3 comments
Open

Authorization-Tokens are not well documented. #44

tayler6000 opened this issue Mar 15, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@tayler6000
Copy link

Hello, first, thank you for the great practice API!

I came across vAPI through an API hacking course hosted by APIsec. I, and a lot of other students, are having a lot of fun with it, and learning a lot, but many students have run into a problem with the Authorization-Token header. The documentation at http://localhost/vapi always references ``{{apiX_auth}}` but never specifies what format the auth token is in. I personally took about 4 hours trying to figure it out and eventually looked up this repo, read the README, and realized you have a Postman import then generates these tokens for you.

I've completed the course, and so I've had quite a few other students ask me about this when they get stuck as well. Some students figure it out just by guessing since you essentially use the Authorization: Basic {{base64}} scheme; and those students will ask me how I figured it out, or if they just didn't understand something properly. Then I've seen other students who were also stuck for hours, like me, just give up and ask.

I gave four passes at trying to code beautify vapi/resources/views/index.html to then manually add a section on the auth token format as a PR, but with each attempt, it broke the page styling or JS. I'm not familiar with redoc at all to know if there is a way to put a section at the beginning of the documentation, but if there is would you perhaps add that section? Worst case, though it wouldn't be as immediately obvious, do you think we could add a section about it in the README and vapi/resources/views/welcome.html?

If you want to go for the latter, or you want me to try and add a section without beautifying the index page code, let me know and I don't mind submitting a PR for it. Thank you again for all your work!

@roottusk
Copy link
Owner

Hi @tayler6000 ,

Thank you for bringing this to notice. You can run redocly on the updated Postman collection and it will generate the html for it. I haven't done it yet , so feel free to go ahead and do it if you want to . Once done you can replace the generated html with the index.html after testing and create a Pull request. I'll be happy to merge it

Let me know if you have any questions.

Thanks

@brootware
Copy link

Hi just on this, I tried to import the ENVs but {{apix_auth}} is still empty tho. Am I missing something? https://github.com/roottusk/vapi/blob/master/postman/vAPI_ENV.postman_environment.json

@adaskaan
Copy link

adaskaan commented Jul 5, 2023

Authorization-Token is base64 result of username password combined in this format "username:password". Example, for username:foo and password:foo valid Authorization-Token is "Zm9vOmZvbw==". Please add this information to documentation to be clear.

@roottusk roottusk added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants