working on net core 2.0
This commit is contained in:
Родитель
02fc5d4649
Коммит
307ae87c80
|
@ -1,6 +1,6 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26403.7
|
||||
VisualStudioVersion = 15.0.26730.3
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}"
|
||||
EndProject
|
||||
|
@ -86,4 +86,7 @@ Global
|
|||
{EA7EB28F-53B8-4009-9C6B-74DB090CA8DD} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
|
||||
{4490894C-3572-4E63-86F1-EE5105CE8A06} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {76BA4A57-03CE-43BD-9612-6E56193ECD03}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<configuration>
|
||||
<packageSources>
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="linq2db" value="https://www.myget.org/F/linq2db/api/v3/index.json" />
|
||||
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-release/api/v3/index.json" />
|
||||
<add key="linq2db" value="https://www.myget.org/F/linq2db/api/v3/index.json"/>
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -30,11 +30,11 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
{
|
||||
return AddLinqToDBStores(builder, factory,
|
||||
typeof(string),
|
||||
typeof(IdentityUserClaim<string>),
|
||||
typeof(IdentityUserRole<string>),
|
||||
typeof(IdentityUserLogin<string>),
|
||||
typeof(IdentityUserToken<string>),
|
||||
typeof(IdentityRoleClaim<string>));
|
||||
typeof(LinqToDB.Identity.IdentityUserClaim<string>),
|
||||
typeof(LinqToDB.Identity.IdentityUserRole<string>),
|
||||
typeof(LinqToDB.Identity.IdentityUserLogin<string>),
|
||||
typeof(LinqToDB.Identity.IdentityUserToken<string>),
|
||||
typeof(LinqToDB.Identity.IdentityRoleClaim<string>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -52,11 +52,11 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
{
|
||||
return AddLinqToDBStores(builder, factory,
|
||||
typeof(TKey),
|
||||
typeof(IdentityUserClaim<TKey>),
|
||||
typeof(IdentityUserRole<TKey>),
|
||||
typeof(IdentityUserLogin<TKey>),
|
||||
typeof(IdentityUserToken<TKey>),
|
||||
typeof(IdentityRoleClaim<TKey>));
|
||||
typeof(LinqToDB.Identity.IdentityUserClaim<TKey>),
|
||||
typeof(LinqToDB.Identity.IdentityUserRole<TKey>),
|
||||
typeof(LinqToDB.Identity.IdentityUserLogin<TKey>),
|
||||
typeof(LinqToDB.Identity.IdentityUserToken<TKey>),
|
||||
typeof(LinqToDB.Identity.IdentityRoleClaim<TKey>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -10,8 +10,13 @@ namespace LinqToDB.Identity
|
|||
/// Represents a claim that is granted to all users within a role.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">The type of the primary key of the role associated with this claim.</typeparam>
|
||||
public class IdentityRoleClaim<TKey> : IClameConverter, IIdentityRoleClaim<TKey> where TKey : IEquatable<TKey>
|
||||
public class IdentityRoleClaim<TKey> :
|
||||
#if NETSTANDARD2_0
|
||||
Microsoft.AspNetCore.Identity.IdentityRoleClaim<TKey>,
|
||||
#endif
|
||||
IClameConverter, IIdentityRoleClaim<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
#if !NETSTANDARD2_0
|
||||
/// <summary>
|
||||
/// Constructs a new claim with the type and value.
|
||||
/// </summary>
|
||||
|
@ -50,5 +55,6 @@ namespace LinqToDB.Identity
|
|||
/// Gets or sets the claim value for this claim.
|
||||
/// </summary>
|
||||
public virtual string ClaimValue { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Security.Claims;
|
||||
|
||||
|
@ -33,8 +32,13 @@ namespace LinqToDB.Identity
|
|||
/// Represents a claim that a user possesses.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">The type used for the primary key for this user that possesses this claim.</typeparam>
|
||||
public class IdentityUserClaim<TKey> : IIdentityUserClaim<TKey>, IClameConverter where TKey : IEquatable<TKey>
|
||||
public class IdentityUserClaim<TKey> :
|
||||
#if NETSTANDARD2_0
|
||||
Microsoft.AspNetCore.Identity.IdentityUserClaim<TKey>,
|
||||
#endif
|
||||
IIdentityUserClaim<TKey>, IClameConverter where TKey : IEquatable<TKey>
|
||||
{
|
||||
#if !NETSTANDARD2_0
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier for this user claim.
|
||||
/// </summary>
|
||||
|
@ -73,5 +77,6 @@ namespace LinqToDB.Identity
|
|||
ClaimType = claim.Type;
|
||||
ClaimValue = claim.Value;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,13 @@ namespace LinqToDB.Identity
|
|||
/// Represents a login and its associated provider for a user.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">The type of the primary key of the user associated with this login.</typeparam>
|
||||
public class IdentityUserLogin<TKey> : IIdentityUserLogin<TKey> where TKey : IEquatable<TKey>
|
||||
public class IdentityUserLogin<TKey> :
|
||||
#if NETSTANDARD2_0
|
||||
Microsoft.AspNetCore.Identity.IdentityUserLogin<TKey>,
|
||||
#endif
|
||||
IIdentityUserLogin<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
#if !NETSTANDARD2_0
|
||||
/// <summary>
|
||||
/// Gets or sets the login provider for the login (e.g. facebook, google)
|
||||
/// </summary>
|
||||
|
@ -30,5 +35,6 @@ namespace LinqToDB.Identity
|
|||
/// Gets or sets the of the primary key of the user associated with this login.
|
||||
/// </summary>
|
||||
public virtual TKey UserId { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace LinqToDB.Identity
|
||||
|
@ -9,8 +8,13 @@ namespace LinqToDB.Identity
|
|||
/// Represents the link between a user and a role.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">The type of the primary key used for users and roles.</typeparam>
|
||||
public class IdentityUserRole<TKey> : IIdentityUserRole<TKey> where TKey : IEquatable<TKey>
|
||||
public class IdentityUserRole<TKey> :
|
||||
#if NETSTANDARD2_0
|
||||
Microsoft.AspNetCore.Identity.IdentityUserRole<TKey>,
|
||||
#endif
|
||||
IIdentityUserRole<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
#if !NETSTANDARD2_0
|
||||
/// <summary>
|
||||
/// Gets or sets the primary key of the user that is linked to a role.
|
||||
/// </summary>
|
||||
|
@ -20,5 +24,7 @@ namespace LinqToDB.Identity
|
|||
/// Gets or sets the primary key of the role that is linked to the user.
|
||||
/// </summary>
|
||||
public virtual TKey RoleId { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,8 +36,13 @@ namespace LinqToDB.Identity
|
|||
/// Represents an authentication token for a user.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">The type of the primary key used for users.</typeparam>
|
||||
public class IdentityUserToken<TKey> : IIdentityUserToken<TKey> where TKey : IEquatable<TKey>
|
||||
public class IdentityUserToken<TKey> :
|
||||
#if NETSTANDARD2_0
|
||||
Microsoft.AspNetCore.Identity.IdentityUserToken<TKey>,
|
||||
#endif
|
||||
IIdentityUserToken<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
#if !NETSTANDARD2_0
|
||||
/// <summary>
|
||||
/// Gets or sets the primary key of the user that the token belongs to.
|
||||
/// </summary>
|
||||
|
@ -57,5 +62,6 @@ namespace LinqToDB.Identity
|
|||
/// Gets or sets the token value.
|
||||
/// </summary>
|
||||
public virtual string Value { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1,48 +1,68 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core Identity provider that uses LinqToDB.</Description>
|
||||
<VersionPrefix>1.1.0</VersionPrefix>
|
||||
<Authors>Ilya Chudin</Authors>
|
||||
<TargetFrameworks>netstandard1.6;net451;</TargetFrameworks>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<AssemblyName>LinqToDB.Identity</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>$(SolutionDir)linq2db.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||
<PackageId>linq2db.Identity</PackageId>
|
||||
<PackageTags>aspnetcore;linq2db;identity;membership;LinqToDB</PackageTags>
|
||||
<PackageIconUrl>http://www.gravatar.com/avatar/fc2e509b6ed116b9aa29a7988fdb8990?s=320</PackageIconUrl>
|
||||
<PackageProjectUrl>https://github.com/linq2db/LinqToDB.Identity</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>git://github.com/linq2db/LinqToDB.Identity</RepositoryUrl>
|
||||
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
||||
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
<Version>1.2.0</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core Identity provider that uses LinqToDB.</Description>
|
||||
<VersionPrefix>2.0.0</VersionPrefix>
|
||||
<Version>2.0.0</Version>
|
||||
|
||||
<Authors>Ilya Chudin</Authors>
|
||||
|
||||
<TargetFrameworks>netstandard1.6;net451;netstandard2.0</TargetFrameworks>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="**\*.resx" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
|
||||
</ItemGroup>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
<AssemblyName>LinqToDB.Identity</AssemblyName>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.1.2" />
|
||||
<PackageReference Include="linq2db.core" Version="1.9.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$(SolutionDir)linq2db.snk</AssemblyOriginatorKeyFile>
|
||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||
|
||||
<PackageId>linq2db.Identity</PackageId>
|
||||
<PackageTags>aspnetcore;linq2db;identity;membership;LinqToDB</PackageTags>
|
||||
<PackageIconUrl>http://www.gravatar.com/avatar/fc2e509b6ed116b9aa29a7988fdb8990?s=320</PackageIconUrl>
|
||||
<PackageProjectUrl>https://github.com/linq2db/LinqToDB.Identity</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>git://github.com/linq2db/LinqToDB.Identity</RepositoryUrl>
|
||||
|
||||
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="**\*.resx" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="linq2db" Version="2.0.0-rc1773" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' OR '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
|
||||
<DefineConstants>$(DefineConstants);NETSTANDARD2_0</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче