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 input #35
Comments
I still don't see a field in the ui for this, nor am I seeing any token being taken from a response and reused. Any progress? |
You'll need
|
@longseespace After authorize, i get this error when i send a request to /message for exemple, via swagger interface... Any idea? |
If anyone is interested I did manage to solve this issue, by forking the repo and fixing the issue. https://github.com/ivanmarjanovic/feathers-swagger Swager Specification is now inline with 2.0 version documentation https://swagger.io/docs/specification/2-0/authentication/ Correct usage on a global level is:
Also for every service you want to protect you need to add additionl parameter that states which methods are protected.
Works with Swagger UI/Editor default implementation. |
@ivanmarjanovic why you didn't PR it? |
Hi @gabrielperales, |
@ivanmarjanovic ok cool, for some reason it was not working for me with the code from this repo but it worked with yours. I just have double check and now it is working... not sure what I have changed. |
Definition of authentication should work with version 1.0.0 there is also an example with security definitions. |
I realise that this might not be specifically related to feathers-swagger. But we should be able to figure this out together, and add it to this repos installation instructions
Expected behavior
Input field in header that allows the user to add a token to be included with every request.
Actual behavior
No token gets added to requests
What I have done
customized docs.html to add a
input#input_apiKey
field to the headerapp.js:
services/user/index.js:
Oher notes
window.ApiKeyAuthorization
is deprecated. we should useSwaggerClient.ApiKeyAuthorization
insteadwindow.authorizations
is deprecated. We should useSwaggerUi.api.clientAuthorizations.add()
instead.The text was updated successfully, but these errors were encountered: