Skip to content

A package to simplify adding authentication to the Swagger.

License

Notifications You must be signed in to change notification settings

ctyar/Swashbuckle.Auth

Repository files navigation

Swashbuckle Auth

Build Status Ctyar.Swashbuckle.Auth

A package to simplify adding authentication to the Swagger.

Usage

Auth0

builder.Services.AddSwaggerGen(c =>
{
    c.AddAuth0(authority, audience);
});

app.UseSwaggerUI(c =>
{
    c.UseAuth0(clientId, scopes);
});

Identity Server

builder.Services.AddSwaggerGen(c =>
{
    c.AddIdentityServer(authority);
});

app.UseSwaggerUI(c =>
{
    c.UseIdentityServer(clientId, scopes);
});

OAuth2

builder.Services.AddSwaggerGen(c =>
{
    c.AddOAuth2(authorizationUrl, tokenUrl);
});

app.UseSwaggerUI(c =>
{
    c.UseOAuth2(clientId, scopes);
});

Demo

Demo

Build

Install the required .NET SDK.

Run:

$ dotnet build

About

A package to simplify adding authentication to the Swagger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published