forked from ddrilling/AsbCloudServer
Set PersistAuthorization to swagger-ui
This commit is contained in:
parent
e95c04c91e
commit
091464a390
@ -29,7 +29,7 @@ namespace AsbCloudWebApi
|
||||
Name = "Authorization",
|
||||
In = ParameterLocation.Header,
|
||||
Type = SecuritySchemeType.ApiKey,
|
||||
Scheme = "Bearer"
|
||||
Scheme = "Bearer",
|
||||
});
|
||||
|
||||
c.AddSecurityRequirement(new OpenApiSecurityRequirement()
|
||||
@ -45,7 +45,6 @@ namespace AsbCloudWebApi
|
||||
Scheme = "oauth2",
|
||||
Name = "Bearer",
|
||||
In = ParameterLocation.Header,
|
||||
|
||||
},
|
||||
new List<string>()
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ namespace AsbCloudWebApi
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "V1");
|
||||
c.EnablePersistAuthorization();
|
||||
});
|
||||
|
||||
if (env.IsDevelopment())
|
||||
|
Loading…
Reference in New Issue
Block a user