Skip to content

Instantly share code, notes, and snippets.

@hubert17
hubert17 / CustomSwagger.js
Last active April 20, 2021 19:49 — forked from mbasaran/CustomSwagger.js
Add bearer token automatically to Swagger UI using Swashbuckle Asp.Net Core
(function () {
function getJwt(user, pass, success, error, complete) {
//console.log('getJwt ', user);
$.ajax({
url: '/TOKEN',
type: 'POST',
contentType: "application/json",
dataType: "json",
data: JSON.stringify({