Skip to content

Commit 5aa94df

Browse files
authored
Merge pull request #106 from dlmelendez/rel/7.1
v7.1
2 parents bc4ba07 + 071850e commit 5aa94df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+593
-524
lines changed

src/ElCamino.AspNetCore.Identity.AzureTable.Model/ElCamino.AspNetCore.Identity.AzureTable.Model.csproj

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<Description>Azure Table Storage Provider to support ASPNET Core Identity Models</Description>
5-
<Copyright>Copyright © 2022 David Melendez, MIT License</Copyright>
5+
<Copyright>Copyright © 2023 David Melendez, MIT License</Copyright>
66
<AssemblyTitle>Azure Table Storage Provider for ASP.NET Identity Core Models</AssemblyTitle>
77
<Authors>David Melendez</Authors>
88
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
9-
<LangVersion>9.0</LangVersion>
9+
<LangVersion>11.0</LangVersion>
1010
<AssemblyName>ElCamino.AspNetCore.Identity.AzureTable.Model</AssemblyName>
1111
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
1212
<SignAssembly>true</SignAssembly>
@@ -22,7 +22,8 @@
2222
<RepositoryType>git</RepositoryType>
2323
<RepositoryUrl>https://github.com/dlmelendez/identityazuretable.git</RepositoryUrl>
2424
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
25-
<Version>7.0</Version>
25+
<Version>7.1</Version>
26+
<Nullable>enable</Nullable>
2627
<PackageProjectUrl>https://dlmelendez.github.io/identityazuretable</PackageProjectUrl>
2728
<!--<DebugType>Full</DebugType>-->
2829
<!-- DebugType Full is needed for test code coverage, but .nuget symbols doesn't like it-->
@@ -32,9 +33,16 @@
3233
</PropertyGroup>
3334

3435
<ItemGroup>
35-
<PackageReference Include="Azure.Data.Tables" Version="12.6.1" />
36-
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="2.2.0" />
36+
<PackageReference Include="Azure.Data.Tables" Version="12.8.1" />
3737
</ItemGroup>
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
39+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.13" />
40+
</ItemGroup>
41+
42+
<ItemGroup Condition=" '$(TargetFramework)' != 'net7.0' ">
43+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.24" />
44+
</ItemGroup>
45+
3846
<ItemGroup>
3947
<None Include="projectNugetPic.png" Pack="true" PackagePath="\" />
4048
</ItemGroup>

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IKeyHelper.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,29 @@ public interface IKeyHelper
3232

3333
string GeneratePartitionKeyIndexByLogin(string plainLoginProvider, string plainProviderKey);
3434

35-
string GenerateRowKeyUserEmail(string plainEmail);
35+
string GenerateRowKeyUserEmail(string? plainEmail);
3636

3737
string GenerateUserId();
3838

39-
string GenerateRowKeyUserName(string plainUserName);
39+
string GenerateRowKeyUserName(string? plainUserName);
4040

41-
string GeneratePartitionKeyUserName(string plainUserName);
41+
string GeneratePartitionKeyUserName(string? plainUserName);
4242

43-
string GenerateRowKeyUserId(string plainUserId);
43+
string GenerateRowKeyUserId(string? plainUserId);
4444

45-
string GenerateRowKeyIdentityUserRole(string plainRoleName);
45+
string GenerateRowKeyIdentityUserRole(string? plainRoleName);
4646

47-
string GenerateRowKeyIdentityRole(string plainRoleName);
47+
string GenerateRowKeyIdentityRole(string? plainRoleName);
4848

49-
string GeneratePartitionKeyIdentityRole(string plainRoleName);
49+
string GeneratePartitionKeyIdentityRole(string? plainRoleName);
5050

51-
string GenerateRowKeyIdentityUserClaim(string claimType, string claimValue);
51+
string GenerateRowKeyIdentityUserClaim(string? claimType, string? claimValue);
5252

53-
string GenerateRowKeyIdentityRoleClaim(string claimType, string claimValue);
53+
string GenerateRowKeyIdentityRoleClaim(string? claimType, string? claimValue);
5454

55-
string GenerateRowKeyIdentityUserToken(string loginProvider, string tokenName);
55+
string GenerateRowKeyIdentityUserToken(string? loginProvider, string? tokenName);
5656

57-
string GenerateRowKeyIdentityUserLogin(string loginProvider, string providerKey);
57+
string GenerateRowKeyIdentityUserLogin(string? loginProvider, string? providerKey);
5858

5959
string ParsePartitionKeyIdentityRoleFromRowKey(string rowKey);
6060

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityConfiguration.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ namespace ElCamino.AspNetCore.Identity.AzureTable.Model
55
{
66
public class IdentityConfiguration
77
{
8-
public string TablePrefix { get; set; }
8+
public string? TablePrefix { get; set; }
99

10-
public string StorageConnectionString { get; set; }
10+
public string? StorageConnectionString { get; set; }
1111

12-
public string IndexTableName { get; set; }
12+
public string? IndexTableName { get; set; }
1313

14-
public string UserTableName { get; set; }
14+
public string? UserTableName { get; set; }
1515

16-
public string RoleTableName { get; set; }
16+
public string? RoleTableName { get; set; }
1717

1818
}
1919
}

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityRole.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public class IdentityRole<TKey, TUserRole> : Microsoft.AspNetCore.Identity.Ident
5757
where TKey : IEquatable<TKey>
5858
where TUserRole : IdentityUserRole<TKey>
5959
{
60-
public string PartitionKey { get; set; }
61-
public string RowKey { get; set; }
60+
public string PartitionKey { get; set; } = string.Empty;
61+
public string RowKey { get; set; } = string.Empty;
6262
public DateTimeOffset? Timestamp { get; set; }
6363
public ETag ETag { get; set; } = ETag.All;
6464

@@ -67,7 +67,11 @@ public IdentityRole() : base()
6767
}
6868

6969
[IgnoreDataMember]
70-
public override TKey Id { get; set; }
70+
public override TKey Id
71+
{
72+
get { return base.Id; }
73+
set { base.Id = value; }
74+
}
7175

7276

7377

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityRoleClaim.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public override string RoleId
5151
public class IdentityRoleClaim<TKey> : Microsoft.AspNetCore.Identity.IdentityRoleClaim<TKey>, ITableEntity
5252
where TKey : IEquatable<TKey>
5353
{
54-
public string PartitionKey { get; set; }
55-
public string RowKey { get; set; }
54+
public string PartitionKey { get; set; } = string.Empty;
55+
public string RowKey { get; set; } = string.Empty;
5656
public DateTimeOffset? Timestamp { get; set; }
5757
public ETag ETag { get; set; } = ETag.All;
5858

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityUser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ public string PeekRowKey(IKeyHelper keyHelper)
4848

4949

5050

51-
public override string UserName
51+
public override string? UserName
5252
{
5353
get => base.UserName;
5454
set
5555
{
5656
if (!string.IsNullOrWhiteSpace(value))
5757
{
58-
base.UserName = value.Trim();
58+
base.UserName = value!.Trim();
5959
}
6060
}
6161
}
@@ -100,8 +100,8 @@ public override DateTimeOffset? LockoutEnd
100100
}
101101

102102

103-
public string PartitionKey { get; set; }
104-
public string RowKey { get; set; }
103+
public string PartitionKey { get; set; } = string.Empty;
104+
public string RowKey { get; set; } = string.Empty;
105105
public DateTimeOffset? Timestamp { get; set; }
106106
public ETag ETag { get; set; } = ETag.All;
107107

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityUserClaim.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class IdentityUserClaim<TKey> : Microsoft.AspNetCore.Identity.IdentityUse
3737
ITableEntity
3838
where TKey : IEquatable<TKey>
3939
{
40-
public string PartitionKey { get; set; }
41-
public string RowKey { get; set; }
40+
public string PartitionKey { get; set; } = string.Empty;
41+
public string RowKey { get; set; } = string.Empty;
4242
public DateTimeOffset? Timestamp { get; set; }
4343
public ETag ETag { get; set; } = ETag.All;
4444

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityUserIndex.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ public class IdentityUserIndex : ITableEntity
1111
/// <summary>
1212
/// Holds the userid entity key
1313
/// </summary>
14-
public string Id { get; set; }
14+
public string Id { get; set; } = string.Empty;
1515

1616
public double KeyVersion { get; set; }
17-
public string PartitionKey { get; set; }
18-
public string RowKey { get; set; }
17+
public string PartitionKey { get; set; } = string.Empty;
18+
public string RowKey { get; set; } = string.Empty;
1919
public DateTimeOffset? Timestamp { get; set; }
2020
public ETag ETag { get; set; } = ETag.All;
2121
}

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityUserLogin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public class IdentityUserLogin<TKey> : Microsoft.AspNetCore.Identity.IdentityUse
3939
, ITableEntity
4040
where TKey : IEquatable<TKey>
4141
{
42-
public string PartitionKey { get; set; }
43-
public string RowKey { get; set; }
42+
public string PartitionKey { get; set; } = string.Empty;
43+
public string RowKey { get; set; } = string.Empty;
4444
public DateTimeOffset? Timestamp { get; set; }
4545
public ETag ETag { get; set; } = ETag.All;
4646

47-
public virtual string Id { get; set; }
47+
public virtual string Id { get; set; } = string.Empty;
4848
}
4949
}

src/ElCamino.AspNetCore.Identity.AzureTable.Model/IdentityUserRole.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public class IdentityUserRole<TKey> : Microsoft.AspNetCore.Identity.IdentityUser
5151
, ITableEntity
5252
where TKey : IEquatable<TKey>
5353
{
54-
public string PartitionKey { get; set; }
55-
public string RowKey { get; set; }
54+
public string PartitionKey { get; set; } = string.Empty;
55+
public string RowKey { get; set; } = string.Empty;
5656
public DateTimeOffset? Timestamp { get; set; }
5757
public ETag ETag { get; set; } = ETag.All;
5858

5959
[IgnoreDataMember]
60-
public override TKey RoleId { get; set; }
60+
public override TKey RoleId { get => base.RoleId; set => base.RoleId = value; }
6161

62-
public string RoleName { get; set; }
62+
public string? RoleName { get; set; }
6363
}
6464
}

0 commit comments

Comments
 (0)