commit
This commit is contained in:
@@ -22,9 +22,20 @@
|
|||||||
' .in = "header",
|
' .in = "header",
|
||||||
' .description = "access token",
|
' .description = "access token",
|
||||||
' .required = True,
|
' .required = True,
|
||||||
' .type = "string"
|
' .type = "string",
|
||||||
|
' .[default] = "Bearer "
|
||||||
' })
|
' })
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' End Sub
|
' End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'End Class
|
'End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,12 @@ Public Class SwaggerConfig
|
|||||||
' scopes.Add("read", "Read access to protected resources")
|
' scopes.Add("read", "Read access to protected resources")
|
||||||
' scopes.Add("write", "Write access to protected resources")
|
' scopes.Add("write", "Write access to protected resources")
|
||||||
' End Function)
|
' End Function)
|
||||||
c.BasicAuth("basic").Description("Basic HTTP Authentication")
|
'c.BasicAuth("basic").Description("Basic HTTP Authentication")
|
||||||
|
|
||||||
|
'c.ApiKey("apiKey").Description("API Key Authentication").Name("apiKey").In("header")
|
||||||
|
|
||||||
c.OperationFilter(Of AddAuthorizationHeaderParameterOperationFilter)()
|
c.OperationFilter(Of AddAuthorizationHeaderParameterOperationFilter)()
|
||||||
|
'c.OperationFilter(Of AddAuthTokenHeaderParameter)()
|
||||||
|
|
||||||
|
|
||||||
'c.IncludeXmlComments($"{AppDomain.CurrentDomain.BaseDirectory}\bin\MyApi.XML")
|
'c.IncludeXmlComments($"{AppDomain.CurrentDomain.BaseDirectory}\bin\MyApi.XML")
|
||||||
@@ -46,6 +50,7 @@ Public Class SwaggerConfig
|
|||||||
c.DocumentTitle(descr)
|
c.DocumentTitle(descr)
|
||||||
c.EnableDiscoveryUrlSelector()
|
c.EnableDiscoveryUrlSelector()
|
||||||
c.DocExpansion(DocExpansion.Full)
|
c.DocExpansion(DocExpansion.Full)
|
||||||
|
c.EnableApiKeySupport("apiKey", "header")
|
||||||
|
|
||||||
'c.EnableOAuth2Support(clientId:="test-client-id", clientSecret:=Nothing, realm:="test-realm", appName:="Swagger UI", additionalQueryStringParams:=New Dictionary(Of String, String)() From {
|
'c.EnableOAuth2Support(clientId:="test-client-id", clientSecret:=Nothing, realm:="test-realm", appName:="Swagger UI", additionalQueryStringParams:=New Dictionary(Of String, String)() From {
|
||||||
' {"foo", "bar"}
|
' {"foo", "bar"}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Public Module WebApiConfig
|
|||||||
Dim constraintsResolver = New DefaultInlineConstraintResolver()
|
Dim constraintsResolver = New DefaultInlineConstraintResolver()
|
||||||
constraintsResolver.ConstraintMap.Add("apiVersion", GetType(ApiVersionRouteConstraint))
|
constraintsResolver.ConstraintMap.Add("apiVersion", GetType(ApiVersionRouteConstraint))
|
||||||
config.MapHttpAttributeRoutes(constraintsResolver)
|
config.MapHttpAttributeRoutes(constraintsResolver)
|
||||||
'config.Filters.Add(New AuthorizeAttribute)
|
config.Filters.Add(New AuthorizeAttribute) 'wenn alle API Aufrufe autorisiert werden müssen!
|
||||||
|
|
||||||
|
|
||||||
config.AddApiVersioning(Function(options)
|
config.AddApiVersioning(Function(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user