Skip to content

Instantly share code, notes, and snippets.

@darraghoriordan
Created September 19, 2017 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darraghoriordan/bf090758e210d18356b57f4006d65876 to your computer and use it in GitHub Desktop.
Save darraghoriordan/bf090758e210d18356b57f4006d65876 to your computer and use it in GitHub Desktop.
a config for swagger ui
.EnableSwaggerUi(c=>
{
c.InjectStylesheet(assemblyType, "Api.SwaggerExtensions.swaggeroverrides.css");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.hmac-sha1.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.moment.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.enc-base64.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.sha256.js");
c.InjectJavaScript(assemblyType, "Api.SwaggerExtensions.apihmacheaderauth.js");
c.CustomAsset("index", assemblyType, "Api.SwaggerExtensions.custom.index.html");
}
@ianido
Copy link

ianido commented Jun 3, 2021

Where can I find the file: Api.SwaggerExtensions.sha256.js ?

@darraghoriordan
Copy link
Author

I mention it in the blog post here: https://www.darraghoriordan.com/2017/01/11/swagger-ui-custom-hmac-hash-authentication/

They're all from google's crypto project. I've no idea if those libraries are still around these days tho!

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