You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Currently, Swagger UI relies on cookie-based authentication. But, as of #1476, the VirtoCommerce platform won't be using cookies for authentication anymore - it uses OAuth2 Password Grant Flow instead. It is not supported by the swagger-ui.js used in the platform, so the authentication fails for methods that require additional authorization, e.g. GET /api/platform/security/user/{userName}:
Solution:
The easiest solution would probably be to update the swagger-ui. Current version (3.20.1 at the moment of writing this) has built-in support for OAuth authentication:
Proposal of changes:
Install updated version of swagger-ui (from bower or directly from the swagger-ui repository);
Update the SwaggerConfig.cs to include it's files;
Problem:
![image](https://user-images.githubusercontent.com/1835759/49589288-9469aa00-f99b-11e8-9c1d-abeba5de2677.png)
Currently, Swagger UI relies on cookie-based authentication. But, as of #1476, the VirtoCommerce platform won't be using cookies for authentication anymore - it uses OAuth2 Password Grant Flow instead. It is not supported by the
swagger-ui.js
used in the platform, so the authentication fails for methods that require additional authorization, e.g.GET /api/platform/security/user/{userName}
:Solution:
![image](https://user-images.githubusercontent.com/1835759/49589767-cb8c8b00-f99c-11e8-8ecb-b5e31d624759.png)
![image](https://user-images.githubusercontent.com/1835759/49589840-01ca0a80-f99d-11e8-9548-7b181eccfd28.png)
The easiest solution would probably be to update the
swagger-ui
. Current version (3.20.1 at the moment of writing this) has built-in support for OAuth authentication:Proposal of changes:
swagger-ui
(from bower or directly from the swagger-ui repository);SwaggerConfig.cs
to include it's files;swagger-ui.js
for VC Platform. If there were some valuable changes, they need to be applied too.The text was updated successfully, but these errors were encountered: