Skip to content

Commit

Permalink
Merge pull request #27 from Project-MONAI/vchang/depdec
Browse files Browse the repository at this point in the history
Update dependency decisions & fix warnings
  • Loading branch information
mocsharp authored Oct 2, 2023
2 parents d1e0faf + c70c131 commit 758ccea
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 29 deletions.
12 changes: 6 additions & 6 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.11
- 6.0.12
:when: 2022-10-14 23:36:49.751931025 Z
- - :approve
- Microsoft.AspNetCore.TestHost
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.11
- 6.0.12
:when: 2022-10-14 23:36:49.751931025 Z
- - :approve
- Microsoft.CSharp
Expand All @@ -39,7 +39,7 @@
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/main/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:05:48.342748414 Z
- - :approve
- Microsoft.Extensions.Configuration
Expand Down Expand Up @@ -256,7 +256,7 @@
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/microsoft/vstest/main/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-09-01 23:06:13.008314524 Z
- - :approve
- Microsoft.NETCore.Platforms
Expand All @@ -277,14 +277,14 @@
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:06:16.175705981 Z
- - :approve
- Microsoft.TestPlatform.TestHost
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)
:versions:
- 17.4.0
- 17.4.1
:when: 2022-08-16 23:06:17.671459450 Z
- - :approve
- Microsoft.Win32.Primitives
Expand Down
4 changes: 2 additions & 2 deletions src/Authentication/Configurations/AuthenticationOptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 MONAI Consortium
* Copyright 2023 MONAI Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -106,7 +106,7 @@ private void ValidateClaims(List<ClaimMapping> claims, bool validateEndpoints)
}
}

if (validateEndpoints && claim.Endpoints.IsNullOrEmpty())
if (validateEndpoints && claim.Endpoints!.IsNullOrEmpty())
{
throw new InvalidOperationException("Value for claimType is invalid.");
}
Expand Down
6 changes: 3 additions & 3 deletions src/Authentication/Middleware/BasicAuthorizationMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 MONAI Consortium
* Copyright 2023 MONAI Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -59,11 +59,11 @@ public async Task InvokeAsync(HttpContext httpContext)
var authHeader = AuthenticationHeaderValue.Parse(httpContext.Request.Headers["Authorization"]);
if (authHeader.Scheme == "Basic")
{
var credentialBytes = Convert.FromBase64String(authHeader.Parameter);
var credentialBytes = Convert.FromBase64String(authHeader.Parameter ?? "");
var credentials = Encoding.UTF8.GetString(credentialBytes).Split(':', 2);
var username = credentials[0];
var password = credentials[1];
if (string.Compare(username, _options.Value.BasicAuth.Id, false) is 0 &&
if (string.Compare(username, _options.Value.BasicAuth!.Id, false) is 0 &&
string.Compare(password, _options.Value.BasicAuth.Password, false) is 0)
{
var claims = new[] { new Claim("name", credentials[0]) };
Expand Down
53 changes: 35 additions & 18 deletions third-party-licenses.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--
Copyright 2023 MONAI Consortium

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->


# Third-Party Licenses


Expand Down Expand Up @@ -123,14 +140,14 @@ SOFTWARE.


<details>
<summary>Microsoft.AspNetCore.Authentication.JwtBearer 6.0.11</summary>
<summary>Microsoft.AspNetCore.Authentication.JwtBearer 6.0.12</summary>

## Microsoft.AspNetCore.Authentication.JwtBearer

- Version: 6.0.11
- Version: 6.0.12
- Authors: Microsoft
- Project URL: https://asp.net/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer/6.0.11)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer/6.0.12)
- License: [MIT](https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)


Expand Down Expand Up @@ -164,14 +181,14 @@ SOFTWARE.


<details>
<summary>Microsoft.AspNetCore.TestHost 6.0.11</summary>
<summary>Microsoft.AspNetCore.TestHost 6.0.12</summary>

## Microsoft.AspNetCore.TestHost

- Version: 6.0.11
- Version: 6.0.12
- Authors: Microsoft
- Project URL: https://asp.net/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/6.0.11)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/6.0.12)
- License: [MIT](https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)


Expand Down Expand Up @@ -247,15 +264,15 @@ SOFTWARE.


<details>
<summary>Microsoft.CodeCoverage 17.4.0</summary>
<summary>Microsoft.CodeCoverage 17.4.1</summary>

## Microsoft.CodeCoverage

- Version: 17.4.0
- Version: 17.4.1
- Authors: Microsoft
- Owners: Microsoft
- Project URL: https://github.com/microsoft/vstest/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.CodeCoverage/17.4.0)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.CodeCoverage/17.4.1)
- License: [MIT](https://github.com/microsoft/vstest/raw/main/LICENSE)


Expand Down Expand Up @@ -1505,15 +1522,15 @@ SOFTWARE.


<details>
<summary>Microsoft.NET.Test.Sdk 17.4.0</summary>
<summary>Microsoft.NET.Test.Sdk 17.4.1</summary>

## Microsoft.NET.Test.Sdk

- Version: 17.4.0
- Version: 17.4.1
- Authors: Microsoft
- Owners: Microsoft
- Project URL: https://github.com/microsoft/vstest/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/17.4.0)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/17.4.1)
- License: [MIT](https://raw.githubusercontent.com/microsoft/vstest/main/LICENSE)


Expand Down Expand Up @@ -1943,15 +1960,15 @@ consequential or other damages.


<details>
<summary>Microsoft.TestPlatform.ObjectModel 17.4.0</summary>
<summary>Microsoft.TestPlatform.ObjectModel 17.4.1</summary>

## Microsoft.TestPlatform.ObjectModel

- Version: 17.4.0
- Version: 17.4.1
- Authors: Microsoft
- Owners: Microsoft
- Project URL: https://github.com/microsoft/vstest/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.TestPlatform.ObjectModel/17.4.0)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.TestPlatform.ObjectModel/17.4.1)
- License: [MIT](https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)


Expand Down Expand Up @@ -1981,15 +1998,15 @@ SOFTWARE.


<details>
<summary>Microsoft.TestPlatform.TestHost 17.4.0</summary>
<summary>Microsoft.TestPlatform.TestHost 17.4.1</summary>

## Microsoft.TestPlatform.TestHost

- Version: 17.4.0
- Version: 17.4.1
- Authors: Microsoft
- Owners: Microsoft
- Project URL: https://github.com/microsoft/vstest/
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.TestPlatform.TestHost/17.4.0)
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.TestPlatform.TestHost/17.4.1)
- License: [MIT](https://github.com/microsoft/vstest/raw/v17.4.0/LICENSE)


Expand Down

0 comments on commit 758ccea

Please sign in to comment.