BasicAuthentication
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
'Imports System.Web.Http.Description
|
||||
'Imports System.Web.Http.Filters
|
||||
'Imports Microsoft.AspNetCore.Authorization
|
||||
'Imports Swashbuckle.Swagger
|
||||
|
||||
'Public Class AddAuthTokenHeaderParameter
|
||||
' Implements IOperationFilter
|
||||
|
||||
' Public Sub Apply(operation As Operation, schemaRegistry As SchemaRegistry, apiDescription As ApiDescription) Implements IOperationFilter.Apply
|
||||
|
||||
' Dim filterPipeline = apiDescription.ActionDescriptor.GetFilterPipeline()
|
||||
' Dim isAuthorized = filterPipeline.Select(Function(s) s.Instance).Any(Function(sc) sc.GetType().Equals(GetType(IAuthorizationFilter)))
|
||||
|
||||
' Dim allowAnonymous = apiDescription.ActionDescriptor.GetCustomAttributes(Of AllowAnonymousAttribute)().Any()
|
||||
|
||||
' If isAuthorized And (Not allowAnonymous) Then
|
||||
' If operation.parameters Is Nothing Then
|
||||
' operation.parameters = New List(Of Parameter)
|
||||
' End If
|
||||
' operation.parameters.Add(New Parameter With {
|
||||
' .name = "Authorization",
|
||||
' .in = "header",
|
||||
' .description = "access token",
|
||||
' .required = True,
|
||||
' .type = "string",
|
||||
' .[default] = "Bearer "
|
||||
' })
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
47
VERAG_REST_SERVER/App_Start/BasicAuthenticationAttribute.vb
Normal file
47
VERAG_REST_SERVER/App_Start/BasicAuthenticationAttribute.vb
Normal file
@@ -0,0 +1,47 @@
|
||||
Imports System.Net
|
||||
Imports System.Net.Http
|
||||
Imports System.Security.Principal
|
||||
Imports System.Threading
|
||||
Imports System.Web.Http.Controllers
|
||||
Imports System.Web.Http.Description
|
||||
Imports System.Web.Http.Filters
|
||||
Imports Microsoft.AspNetCore.Authorization
|
||||
Imports Swashbuckle.Swagger
|
||||
|
||||
Public Class BasicAuthenticationAttribute
|
||||
Inherits AuthorizationFilterAttribute
|
||||
|
||||
Public Overrides Sub OnAuthorization(ByVal actionContext As HttpActionContext)
|
||||
Dim authHeader = actionContext.Request.Headers.Authorization
|
||||
|
||||
If authHeader IsNot Nothing Then
|
||||
Dim authenticationToken = actionContext.Request.Headers.Authorization.Parameter
|
||||
Dim decodedAuthenticationToken = Encoding.UTF8.GetString(Convert.FromBase64String(authenticationToken))
|
||||
Dim usernamePasswordArray = decodedAuthenticationToken.Split(":"c)
|
||||
Dim userName = usernamePasswordArray(0)
|
||||
Dim password = usernamePasswordArray(1)
|
||||
Dim isValid = userName = "test" AndAlso password = "password"
|
||||
|
||||
If isValid Then
|
||||
Dim principal = New GenericPrincipal(New GenericIdentity(userName), Nothing)
|
||||
Thread.CurrentPrincipal = principal
|
||||
actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.OK, "User " & userName & " successfully authenticated")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
HandleUnathorized(actionContext)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub HandleUnathorized(ByVal actionContext As HttpActionContext)
|
||||
actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.Unauthorized)
|
||||
actionContext.Response.Headers.Add("WWW-Authenticate", "Basic Scheme='Data' location = 'http://localhost:")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Web.Http
|
||||
Imports System.Net.Http
|
||||
Imports System.Web.Http
|
||||
Imports System.Web.Http.Description
|
||||
Imports Microsoft.Extensions.Options
|
||||
Imports Swashbuckle.Application
|
||||
@@ -6,6 +7,7 @@ Imports Swashbuckle.Swagger
|
||||
Imports Swashbuckle.SwaggerUi
|
||||
|
||||
|
||||
|
||||
'<Assembly: PreApplicationStartMethod(GetType(SwaggerConfig), "Register")>
|
||||
|
||||
|
||||
@@ -21,43 +23,56 @@ Public Class SwaggerConfig
|
||||
GlobalConfiguration.Configuration.EnableSwagger(Function(c)
|
||||
'c.SingleApiVersion("v1", descr)
|
||||
|
||||
|
||||
c.PrettyPrint()
|
||||
c.MultipleApiVersions(Function(apiDesc, targetApiVersion) ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion), Function(vc)
|
||||
|
||||
vc.Version("v1", descr & " V1")
|
||||
vc.Version("v1", descr & " V1").Description("A sample API for testing ").TermsOfService("Some Terms").Contact(Function(cont)
|
||||
cont.Name("VERAG AG")
|
||||
cont.Url("http://test.at")
|
||||
cont.Email("Mail.test")
|
||||
End Function).License(Function(lic)
|
||||
lic.Name("Lizenz")
|
||||
lic.Url("http://test.at")
|
||||
End Function)
|
||||
|
||||
|
||||
vc.Version("v2", descr & " V2")
|
||||
vc.Version("v3", descr & " V3")
|
||||
End Function)
|
||||
|
||||
|
||||
'c.OAuth2("oauth2").Description("OAuth2 Implicit Grant").Flow("implicit").AuthorizationUrl("http://petstore.swagger.wordnik.com/api/oauth/dialog").Scopes(Function(scopes)
|
||||
' scopes.Add("read", "Read access to protected resources")
|
||||
' scopes.Add("write", "Write access to protected resources")
|
||||
' End Function)
|
||||
'c.BasicAuth("basic").Description("Basic HTTP Authentication")
|
||||
' c.OAuth2("oauth2").Description("OAuth2 Implicit Grant").Flow("implicit").AuthorizationUrl("http://petstore.swagger.wordnik.com/api/oauth/dialog").Scopes(Function(scopes)
|
||||
'End Function)
|
||||
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 AddAuthTokenHeaderParameter)()
|
||||
|
||||
'c.OperationFilter(Of AddAuthorizationHeaderParameterOperationFilter)()
|
||||
|
||||
'c.OperationFilter(Of BasicAuthenticationAttribute)()
|
||||
|
||||
|
||||
'c.IncludeXmlComments($"{AppDomain.CurrentDomain.BaseDirectory}\bin\MyApi.XML")
|
||||
'c.RootUrl(Function(req) "http://localhost:58452/")
|
||||
'c.RootUrl(Function(req) req.GetRouteData)
|
||||
|
||||
End Function).EnableSwaggerUi(Function(c)
|
||||
c.DocumentTitle(descr)
|
||||
|
||||
c.EnableDiscoveryUrlSelector()
|
||||
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.EnableApiKeySupport("apiKey", "header")
|
||||
'c.CustomAsset("index", yourAssembly, "YourWebApiProject.SwaggerExtensions.index.html")
|
||||
'c.EnableOAuth2Support(clientId:="test-client-id", clientSecret:=Nothing, realm:="test-realm", appName:="Swagger UI")
|
||||
'additionalQueryStringParams:=New Dictionary(Of String, String)() From {
|
||||
' {"foo", "bar"}
|
||||
'})
|
||||
|
||||
|
||||
End Function)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ Imports Microsoft.Extensions.DependencyInjection
|
||||
Imports Microsoft.Web.Http
|
||||
Imports Microsoft.Web.Http.Routing
|
||||
Imports Microsoft.Web.Http.Versioning
|
||||
Imports Swashbuckle.Application
|
||||
Imports Swashbuckle.Swagger
|
||||
|
||||
Public Module WebApiConfig
|
||||
|
||||
@@ -58,8 +60,12 @@ Public Module WebApiConfig
|
||||
|
||||
Dim constraintsResolver = New DefaultInlineConstraintResolver()
|
||||
constraintsResolver.ConstraintMap.Add("apiVersion", GetType(ApiVersionRouteConstraint))
|
||||
|
||||
|
||||
config.MapHttpAttributeRoutes(constraintsResolver)
|
||||
config.Filters.Add(New AuthorizeAttribute) 'wenn alle API Aufrufe autorisiert werden müssen!
|
||||
'config.Filters.Add(New AuthorizeAttribute) 'wenn alle API Aufrufe autorisiert werden müssen/ansonsten können einzelene Controlleraufrufe auth. werden!
|
||||
config.Filters.Add(New BasicAuthenticationAttribute())
|
||||
|
||||
|
||||
|
||||
config.AddApiVersioning(Function(options)
|
||||
@@ -77,8 +83,12 @@ Public Module WebApiConfig
|
||||
c.SubstituteApiVersionInUrl = True
|
||||
End Function)
|
||||
|
||||
|
||||
|
||||
SwaggerConfig.Register(config)
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
68
VERAG_REST_SERVER/BasicAuthentificationHandler.vb
Normal file
68
VERAG_REST_SERVER/BasicAuthentificationHandler.vb
Normal file
@@ -0,0 +1,68 @@
|
||||
Imports System.Net.Http.Headers
|
||||
Imports System.Security.Claims
|
||||
Imports System.Text.Encodings.Web
|
||||
Imports System.Threading.Tasks
|
||||
Imports Microsoft.AspNetCore.Authentication
|
||||
Imports Microsoft.Extensions.Logging
|
||||
Imports Microsoft.Extensions.Options
|
||||
Imports Microsoft.AspNetCore.Http.Abstractions
|
||||
|
||||
|
||||
Public Class BasicAuthentificationHandler
|
||||
Inherits AuthenticationHandler(Of AuthenticationSchemeOptions)
|
||||
|
||||
ReadOnly _userService As IUserService
|
||||
|
||||
|
||||
Public Sub New(userService As IUserService, options As Microsoft.Extensions.Options.IOptionsMonitor(Of AuthenticationSchemeOptions), logger As ILoggerFactory, encoder As UrlEncoder, clock As ISystemClock)
|
||||
|
||||
MyBase.New(options, logger, encoder, clock)
|
||||
_userService = userService
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function HandleChallengeAsync(properties As AuthenticationProperties) As Task
|
||||
GetResponse().Headers("WWW-Authenticate") = "Basic"
|
||||
Return MyBase.HandleChallengeAsync(properties)
|
||||
End Function
|
||||
|
||||
Private Function GetResponse() As Object
|
||||
Return Response
|
||||
End Function
|
||||
|
||||
Protected Overrides Function HandleAuthenticateAsync() As Task(Of AuthenticateResult)
|
||||
|
||||
Dim username As String = ""
|
||||
|
||||
Try
|
||||
|
||||
Dim authHeader = AuthenticationHeaderValue.Parse(GetResponse().Headers("Authorization"))
|
||||
Dim credentials = Encoding.UTF8.GetString(Convert.FromBase64String(authHeader.Parameter)).Split(":")
|
||||
username = credentials.FirstOrDefault
|
||||
Dim password = credentials.LastOrDefault
|
||||
|
||||
If Not _userService.CheckUser(username, password) Then
|
||||
Throw New NotImplementedException("Invalid Username or password")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Return Task.FromResult(AuthenticateResult.Fail(ex.Message))
|
||||
|
||||
End Try
|
||||
|
||||
Dim claims = {New Claim(ClaimTypes.Name, username)}
|
||||
Dim idendity = New ClaimsIdentity(claims, Scheme.Name)
|
||||
Dim principal = New ClaimsPrincipal(idendity)
|
||||
Dim ticket = New AuthenticationTicket(principal, Scheme.Name)
|
||||
|
||||
Return Task.FromResult(AuthenticateResult.Success(ticket))
|
||||
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
End Class
|
||||
@@ -3,11 +3,10 @@ Imports System.Web.Http
|
||||
Imports Microsoft.Web.Http
|
||||
|
||||
Namespace ApiController.Controllers
|
||||
'v{version:apiVersion}
|
||||
|
||||
<ApiVersion("1")>
|
||||
<System.Web.Http.Route("api/v{version:apiVersion}/AVISO")>
|
||||
<Authorize>
|
||||
<BasicAuthentication>
|
||||
Public Class AVISOController
|
||||
Inherits System.Web.Http.ApiController
|
||||
|
||||
@@ -30,7 +29,7 @@ Namespace ApiController.Controllers
|
||||
|
||||
|
||||
Public Function GetValue() As String
|
||||
Return "Hello world! -> muss autorisiert werden!"
|
||||
Return "Hello world!"
|
||||
End Function
|
||||
|
||||
Public Function PostValue(ByVal API_AVISO As VERAG_PROG_ALLGEMEIN.cVERAG_in_TRAviso) As String
|
||||
|
||||
@@ -6,7 +6,9 @@ Public Class WebApiApplication
|
||||
Protected Sub Application_Start()
|
||||
GlobalConfiguration.Configure(AddressOf WebApiConfig.Register)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
5
VERAG_REST_SERVER/IService/IUserService.vb
Normal file
5
VERAG_REST_SERVER/IService/IUserService.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
Public Interface IUserService
|
||||
|
||||
Function CheckUser(ByVal username As String, ByVal passowrd As String)
|
||||
|
||||
End Interface
|
||||
7
VERAG_REST_SERVER/Service/Service.vb
Normal file
7
VERAG_REST_SERVER/Service/Service.vb
Normal file
@@ -0,0 +1,7 @@
|
||||
Public Class Service
|
||||
Implements IUserService
|
||||
|
||||
Public Function CheckUser(username As String, passowrd As String) As Object Implements IUserService.CheckUser
|
||||
Return username.Equals("testuser") & passowrd.Equals("pwd")
|
||||
End Function
|
||||
End Class
|
||||
@@ -53,16 +53,31 @@
|
||||
<Reference Include="Microsoft.AspNet.WebApi.Versioning.ApiExplorer, Version=4.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.4.1.1\lib\net45\Microsoft.AspNet.WebApi.Versioning.ApiExplorer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Authentication.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Authentication.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Authorization, Version=7.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Authorization.7.0.3\lib\net462\Microsoft.AspNetCore.Authorization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Cryptography.Internal, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Cryptography.Internal.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Cryptography.Internal.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.DataProtection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.DataProtection.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.DataProtection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.DataProtection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Abstractions">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=5.0.17.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Features.5.0.17\lib\net461\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -136,6 +151,18 @@
|
||||
<Reference Include="Microsoft.Extensions.WebEncoders, Version=7.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.WebEncoders.7.0.3\lib\net462\Microsoft.Extensions.WebEncoders.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.27.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.6.27.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Logging.6.27.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.6.27.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Net.Http.Headers, Version=2.2.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Net.Http.Headers.2.2.8\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -145,6 +172,9 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -160,16 +190,21 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=7.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.7.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.6.27.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.7.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.9\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
@@ -187,6 +222,20 @@
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Xml, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Xml.4.5.0\lib\net461\System.Security.Cryptography.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Permissions, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Permissions.4.5.0\lib\net461\System.Security.Permissions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -196,6 +245,7 @@
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -254,10 +304,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\AddAuthorizationHeaderParameterOperationFilter.vb" />
|
||||
<Compile Include="App_Start\AddAuthTokenHeaderParamete.vb" />
|
||||
<Compile Include="App_Start\BasicAuthenticationAttribute.vb" />
|
||||
<Compile Include="App_Start\RouteConfig.vb" />
|
||||
<Compile Include="App_Start\SwaggerConfig.vb" />
|
||||
<Compile Include="App_Start\WebApiConfig.vb" />
|
||||
<Compile Include="BasicAuthentificationHandler.vb" />
|
||||
<Compile Include="Controllers\V1\AvisoController\AVISOController.vb" />
|
||||
<Compile Include="Controllers\V1\CustomsDeclaration\CustomsDeclarationController.vb" />
|
||||
<Compile Include="Controllers\V2\CustomsDeclarationController\CustomDeclarationController.vb" />
|
||||
@@ -270,6 +321,7 @@
|
||||
<Compile Include="Global.asax.vb">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="IService\IUserService.vb" />
|
||||
<Compile Include="Models\cTEST.vb" />
|
||||
<Compile Include="Models\cVERAG_in_shippmentOLD.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
@@ -291,6 +343,7 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Service\Service.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
@@ -359,7 +412,7 @@
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>58452</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:58452/</IISUrl>
|
||||
<IISUrl>http://localhost:58452</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -9,10 +9,14 @@
|
||||
<package id="Microsoft.AspNet.WebApi.Versioning.ApiExplorer" version="4.1.1" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.9" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost.de" version="5.2.9" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Authentication" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Authentication.Core" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Authorization" version="7.0.3" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Authorization.Policy" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Cryptography.Internal" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.DataProtection" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.DataProtection.Abstractions" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.2.0" targetFramework="net47" />
|
||||
<package id="Microsoft.AspNetCore.Http" version="2.2.2" targetFramework="net47" />
|
||||
@@ -42,20 +46,31 @@
|
||||
<package id="Microsoft.Extensions.Options" version="7.0.1" targetFramework="net47" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="7.0.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Extensions.WebEncoders" version="7.0.3" targetFramework="net47" />
|
||||
<package id="Microsoft.IdentityModel.Abstractions" version="6.27.0" targetFramework="net47" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.27.0" targetFramework="net47" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="6.27.0" targetFramework="net47" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="6.27.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Net.Http.Headers" version="2.2.8" targetFramework="net47" />
|
||||
<package id="Microsoft.OpenApi" version="1.6.1" targetFramework="net47" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net47" />
|
||||
<package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net47" />
|
||||
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net47" />
|
||||
<package id="Swashbuckle" version="5.6.0" targetFramework="net47" />
|
||||
<package id="Swashbuckle.Core" version="5.6.0" targetFramework="net47" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net47" />
|
||||
<package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net47" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="7.0.1" targetFramework="net47" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="6.27.0" targetFramework="net47" />
|
||||
<package id="System.IO.Pipelines" version="7.0.0" targetFramework="net47" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net47" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net47" />
|
||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Security.AccessControl" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Security.Cryptography.Xml" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Security.Permissions" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net47" />
|
||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net47" />
|
||||
<package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net47" />
|
||||
<package id="System.Text.Json" version="7.0.2" targetFramework="net47" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net47" />
|
||||
|
||||
Reference in New Issue
Block a user