How to pass SSL Certificate with Swagger UI from Angular 4 when invoking a REST API
Hello, I have a query. How to pass SSL Certificate with Swagger UI from Angular 4 to invoke a REST API , which is enabled with Mutual Authentication via certificate? Do we have any provision to intercept the request in Swagger UI before invoking a particular API request. My Application Ex: My application(A) is getting the Swagger JSON from the bitbucket of another target application(B) and rendering it in my application(A) with Swagger UI. Now the target application(B), has enabled Mutual Auth. Now when the API of application(B) is invoked from the Swagger UI of my application(A), how can we pass the SSL Certificate along with this API call? I would also like to know what other approach(es) can be used to pass Authentication when trying out any API?Working with Django authentication?
I'm trying to make a standard Swagger UI page work with Django's standard authentication scheme. Django prefers to receive a username and password as JSON content in the body, and passes back a token in a return JSON message. That token must then be included in the Authorization header of future requests. Is there something in Swagger that does this, and I missed it? Is there a better authentication framework that Django has an implementation of? Please let me know. Thanks, RobertHow to generate the same Bearer token as Swagger?
I have given an API which uses Basic_auth for Authentication. it requires 'username', 'password', (type:basic_auth), 'ClientId' and 'secret'. I use the Swagger UI to authenticate and it works perfectly fine: the Curl will look like this: curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1ZR0FtX2hHeWRvYWhrSGtlcjRlaTRiTXRSUSIsImtpZCI6Ik1ZR0FtX2hHeWRvYWhrSGtlcjRlaTRiTXRSUSJ9.eyJpc3MiOiJDdXN0b21lckNsdWJXZWJTZXJ2aWNlIiwiYXVkIjoiQ3VzdG9tZXJDbHViV2ViU2VydmljZS9yZXNvdXJjZXMiLCJleHAiOjE1NjM4NzY2MTEsIm5iZiI6MTU2MzI3MTgxMSwiY2xpZW50X2lkIjoiY3VzdG9tZXJjbHViIiwic2NvcGUiOlsib3BlbmlkIiwicHJvZmlsZSIsInVzZXJfaW5mbyJdLCJzdWIiOiJjdXN0b21lcmNsdWIiLCJhdXRoX3RpbWUiOjE1NjMyNzE4MTEsImlkcCI6Imlkc3J2IiwicHJpbWFyeV9zaWQiOiJjdXN0b21lcmNsdWIiLCJ1cG4iOiJjdXN0b21lcmNsdWIiLCJuYW1lIjoiY3VzdG9tZXJjbHViIiwiZ2l2ZW5fbmFtZSI6ImN1c3RvbWVyY2x1YiIsImp0aSI6IjRhMGUyZjNkYjUzYjY2ZGQxMDIwMmJkNmVmNzM4OWJjIiwiYW1yIjpbImN1c3RvbSJdfQ.YY1CzHzWPK_E1S7y8TDrwRT0orCS9zfN-4n5pTC1zYMomkOkJOdpvmSZyrabirBeLpGi870T9H-z9ufkYX5B1bPZlQlQRAAaDPeq_pV7Gls9EPLhAK8uXK4i5jaF1aNN5hiBP6fAJZxhZnHsmUevXs6y5s9FJeVZ1vPpDfJ69d3rrTvte_2A6hEE6fpkYeZGUKRS8eTaWHSrdZh9-18FaQN4VGbCCtsHR7x-A2HMLIG8q9MWp6iu_KDJ95wOHO_tp--AER4CoGta0HrleI7CNUBz43TN-kEklmzVCODuFA7varUIAiee4Zd2PKG7MlGEdkOBA5qwoX1HhsobGOI5ZA' ' The problem is, every time the token expires, I have to come back and use the Swagger UI to authenticate, and copy the Bearer token to my app. I would like to know, how Swagger is creating it? And how could I implement it on my machine so that everytime it expires, my app creates it itself instead of getting an error and changing it? I tried many ways, but I couldn't get the Bearer token the way Swagger gets it. It only works when Swagger creates it.5.7KViews0likes2CommentsSecuring the default page of OpenAPI documentation
Dear community, I am trying to generate OpenAPI documentation for my existing .net core Web API's. The Web API's are protected by AAD B2C (by OAuth 2.0 spec). But when implementing the open API documentation, the default documentation page popping up without any credential verififcaiton. Since my requirement is to make the default page that lists the titles and documentation as well need an authentication before displaying that page. I was thinking to have separate authorization filter for documentation path, but how to configure the handshaking part of OAuth is looking grey to me. Could someone help me on this? Regards, Shanmugam