-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions
committed
Nov 12, 2023
1 parent
42b9352
commit acf59be
Showing
24 changed files
with
402 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
src/Aguacongas.TheIdServer.Identity/Extensions/IdentityBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...acongas.TheIdServer.Identity.Argon2PasswordHasher/Extensions/IdentityBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Aguacongas.TheIdServer.Identity.Argon2PasswordHasher; | ||
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection; | ||
|
||
/// <summary> | ||
/// <see cref="IdentityBuilder"/> extensions | ||
/// </summary> | ||
public static class IdentityBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Add argon2 password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configure"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddArgon2PasswordHasher<TUser>(this IdentityBuilder builder, Action<Argon2PasswordHasherOptions>? configure = null) where TUser : class | ||
{ | ||
builder.Services.AddArgon2PasswordHasher<TUser>(configure); | ||
return builder; | ||
} | ||
|
||
/// <summary> | ||
/// Add argon2 password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configuration"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddArgon2PasswordHasher<TUser>(this IdentityBuilder builder, IConfiguration configuration) where TUser : class | ||
{ | ||
builder.Services.AddArgon2PasswordHasher<TUser>(configuration); | ||
return builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...acongas.TheIdServer.Identity.BcryptPasswordHasher/Extensions/IdentityBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Aguacongas.TheIdServer.Identity.BcryptPasswordHasher; | ||
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection; | ||
|
||
/// <summary> | ||
/// <see cref="IdentityBuilder"/> extensions | ||
/// </summary> | ||
public static class IdentityBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Add Bcrypt password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configure"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddBcryptPasswordHasher<TUser>(this IdentityBuilder builder, Action<BcryptPasswordHasherOptions>? configure = null) where TUser : class | ||
{ | ||
builder.Services.AddBcryptPasswordHasher<TUser>(configure); | ||
return builder; | ||
} | ||
|
||
/// <summary> | ||
/// Add Bcrypt password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configuration"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddBcryptPasswordHasher<TUser>(this IdentityBuilder builder, IConfiguration configuration) where TUser : class | ||
{ | ||
builder.Services.AddBcryptPasswordHasher<TUser>(configuration); | ||
return builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...acongas.TheIdServer.Identity.ScryptPasswordHasher/Extensions/IdentityBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Aguacongas.TheIdServer.Identity.ScryptPasswordHasher; | ||
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection; | ||
|
||
/// <summary> | ||
/// <see cref="IdentityBuilder"/> extensions | ||
/// </summary> | ||
public static class IdentityBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Add Scrypt password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configure"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddScryptPasswordHasher<TUser>(this IdentityBuilder builder, Action<ScryptPasswordHasherOptions>? configure = null) where TUser : class | ||
{ | ||
builder.Services.AddScryptPasswordHasher<TUser>(configure); | ||
return builder; | ||
} | ||
|
||
/// <summary> | ||
/// Add Scrypt password hasher services in DI | ||
/// </summary> | ||
/// <typeparam name="TUser"></typeparam> | ||
/// <param name="builder"></param> | ||
/// <param name="configuration"></param> | ||
/// <returns></returns> | ||
public static IdentityBuilder AddScryptPasswordHasher<TUser>(this IdentityBuilder builder, IConfiguration configuration) where TUser : class | ||
{ | ||
builder.Services.AddScryptPasswordHasher<TUser>(configuration); | ||
return builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.