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

configuration for adding dynamic api-key(access token value). #1936

Closed
akashgupta08 opened this issue Jul 25, 2017 · 6 comments
Closed

configuration for adding dynamic api-key(access token value). #1936

akashgupta08 opened this issue Jul 25, 2017 · 6 comments

Comments

@akashgupta08
Copy link

I need to provide a access token on the swagger-ui page so that all the request can be authenticated.

I have implemented the following.

@bean
SecurityConfiguration security() {
return new SecurityConfiguration(null, null, null, "Spring Boot Swagger", "baedeb03-5142-466e-8d8f-c0987a8078f8", ApiKeyVehicle.HEADER, "X-AUTH-TOKEN",",");
}

Above: I have fixed the value of X-AUTH-TOKEN value, I want this to be added with swagger ui, whenever user testing the api.

Any suggestion would be of great help.

@dilipkrish
Copy link
Member

It should work, Is it not working? what version of springfox are you using?

@akashgupta08
Copy link
Author

This is working , you see I have hardcoded the value of "X-AUTH-TOKEN: baedeb03-5142-466e-8d8f-c0987a8078f", I want this value to be entered by tester like from swagger-ui,
btw I am using 2.7.0 for both.

@dilipkrish
Copy link
Member

We'll have that when we do the 3.x swagger-ui migration.

@akashgupta08
Copy link
Author

any expected date for availability of 3.x swagger-ui.

@dilipkrish
Copy link
Member

None yet. Looking for contributions.

@dilipkrish
Copy link
Member

This is fixed via upgrade to swagger 3.x (#2153)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants