Skip to content

Commit

Permalink
chore: type fixes (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewTriesToCode committed Jul 1, 2023
1 parent c42c53d commit c96a529
Show file tree
Hide file tree
Showing 128 changed files with 184 additions and 184 deletions.
61 changes: 30 additions & 31 deletions docs/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,37 +116,36 @@ work.

```json
"Finbuckle:MultiTenant:Stores:ConfigurationStore": {
"Defaults": {
"ConnectionString": "",
"CookieLoginPath": "/__tenant__/home/login",
"CookieLogoutPath": "/__tenant__/home/logout"
},
"Tenants": [
{
"Id": "93f330717e5d4f039cd05da312d559cc",
"Identifier": "megacorp",
"Name": "MegaCorp",
"ChallengeScheme": "Cookies"
},
{
"Id": "505c5c97f4e2442394610c673ac91f61",
"Identifier": "acme",
"Name": "ACME",
"ChallengeScheme": "OpenIdConnect",
"OpenIdConnectAuthority": "https://finbuckle-acme.us.auth0.com",
"OpenIdConnectClientId": "2lGONpJBwIqWuN2QDAmBbYGt0k0khwQB",
"OpenIdConnectClientSecret": "HWxQfz6U8GvPCSsvfH5U3uv6CzAeQSt8qHrc19_qEvUQhdsaJX9Dp-t9W-5SAj0m"
},
{
"Id": "4ee609d6da0342e682012232566cff0e",
"Identifier": "initech",
"Name": "Initech",
"ChallengeScheme": "OpenIdConnect",
"OpenIdConnectAuthority": "https://finbuckle-initech.us.auth0.com",
"OpenIdConnectClientId": "nmPF6VABNmzTISvtYLPenf08ARveQifZ",
"OpenIdConnectClientSecret": "WINWtT2WAhWYUOgGHsAPIUV-dAHs1X4qcU6Pv98HBrorlOB5OMKetnsR0Ov0LuVm"
}
]
"Defaults": {
"ConnectionString": "",
"CookieLoginPath": "/__tenant__/home/login",
"CookieLogoutPath": "/__tenant__/home/logout"
},
"Tenants": [
{
"Id": "93f330717e5d4f039cd05da312d559cc",
"Identifier": "megacorp",
"Name": "MegaCorp",
"ChallengeScheme": "Cookies"
},
{
"Id": "505c5c97f4e2442394610c673ac91f61",
"Identifier": "acme",
"Name": "ACME",
"ChallengeScheme": "OpenIdConnect",
"OpenIdConnectAuthority": "https://finbuckle-acme.us.auth0.com",
"OpenIdConnectClientId": "2lGONpJBwIqWuN2QDAmBbYGt0k0khwQB",
"OpenIdConnectClientSecret": "HWxQfz6U8GvPCSsvfH5U3uv6CzAeQSt8qHrc19_qEvUQhdsaJX9Dp-t9W-5SAj0m"
},
{
"Id": "4ee609d6da0342e682012232566cff0e",
"Identifier": "initech",
"Name": "Initech",
"ChallengeScheme": "OpenIdConnect",
"OpenIdConnectAuthority": "https://finbuckle-initech.us.auth0.com",
"OpenIdConnectClientId": "nmPF6VABNmzTISvtYLPenf08ARveQifZ",
"OpenIdConnectClientSecret": "WINWtT2WAhWYUOgGHsAPIUV-dAHs1X4qcU6Pv98HBrorlOB5OMKetnsR0Ov0LuVm"
}]
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant.AspNetCore/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("Finbuckle.MultiTenant.AspNetCore.Test")]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Finbuckle.MultiTenant.AspNetCore;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.IO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

// Portions of this file are derived from the .NET Foundation source file located at:
// https://github.com/dotnet/aspnetcore/blob/main/src/Http/Authentication.Core/src/AuthenticationSchemeProvider.cs
Expand Down Expand Up @@ -114,7 +114,7 @@ public MultiTenantAuthenticationSchemeProvider(IAuthenticationSchemeProvider inn
/// <summary>
/// Returns the scheme for this tenant that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>.
/// This is typically specified via <see cref="AuthenticationOptions.DefaultSignOutScheme"/>.
/// Otherwise this will fallback to <see cref="GetDefaultSignInSchemeAsync"/> if that supoorts sign out.
/// Otherwise this will fallback to <see cref="GetDefaultSignInSchemeAsync"/> if that supports sign out.
/// </summary>
/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/> or null if not found.</returns>
public virtual Task<AuthenticationScheme?> GetDefaultSignOutSchemeAsync()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Security.Claims;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

namespace Finbuckle.MultiTenant.AspNetCore
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

namespace Finbuckle.MultiTenant.AspNetCore.Options
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Linq;
Expand Down Expand Up @@ -37,7 +37,8 @@ public RemoteAuthenticationCallbackStrategy(ILogger<RemoteAuthenticationCallback
Where(s => typeof(IAuthenticationRequestHandler).IsAssignableFrom(s.HandlerType)))
// Where(s => s.HandlerType.ImplementsOrInheritsUnboundGeneric(typeof(RemoteAuthenticationHandler<>))))
{
// Unfortnately we can't rely on the ShouldHandleAsync method since OpenId Connect handler doesn't use it.
// TODO verify this comment
// Unfortunately we can't rely on the ShouldHandleAsync method since OpenId Connect handler doesn't use it.
// Instead we'll get the paths to check from the options.
var optionsType = scheme.HandlerType.GetProperty("Options")?.PropertyType;

Expand Down Expand Up @@ -85,7 +86,7 @@ public RemoteAuthenticationCallbackStrategy(ILogger<RemoteAuthenticationCallback
if (properties == null)
{
if (logger != null)
logger.LogWarning("A tenant could not be determined because no state paraameter passed with the remote authentication callback.");
logger.LogWarning("A tenant could not be determined because no state parameter passed with the remote authentication callback.");
return null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("Finbuckle.MultiTenant.EntityFrameworkCore.Test")]
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant.EntityFrameworkCore/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

namespace Finbuckle.MultiTenant.EntityFrameworkCore
{
Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant.EntityFrameworkCore/Enums.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

namespace Finbuckle.MultiTenant
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Microsoft.EntityFrameworkCore.Metadata;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Finbuckle.MultiTenant;
using Finbuckle.MultiTenant.Stores;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Linq;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Linq;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Microsoft.EntityFrameworkCore.Metadata;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Linq;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

namespace Finbuckle.MultiTenant.EntityFrameworkCore
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Linq;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using Finbuckle.MultiTenant.Internal;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

// ReSharper disable once CheckNamespace
namespace Finbuckle.MultiTenant;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

// ReSharper disable once CheckNamespace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Threading.Tasks;

Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant/Abstractions/ITenantInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

// ReSharper disable once CheckNamespace
namespace Finbuckle.MultiTenant;
Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant/Abstractions/ITenantResolver.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("Finbuckle.MultiTenant.Test")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using Microsoft.Extensions.DependencyInjection.Extensions;
Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant/Events/MultiTenantEvents.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

using System;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/Finbuckle.MultiTenant/Events/TenantNotFoundContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright Finbuckle LLC, Andrew White, and Contributors.
// Refer to the solution LICENSE file for more inforation.
// Refer to the solution LICENSE file for more information.

// ReSharper disable once CheckNamespace
namespace Finbuckle.MultiTenant;
Expand Down
Loading

0 comments on commit c96a529

Please sign in to comment.