-
Notifications
You must be signed in to change notification settings - Fork 123
Ntuthuko/consolidate authentication settings #4330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ntuthukomsane-boxfusion
wants to merge
45
commits into
shesha-io:main
Choose a base branch
from
ntuthukomsane-boxfusion:ntuthuko/consolidate-authentication-settings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
5c0b606
consolidation of authentication settings
ntuthukomsane e69fd3e
shesha authentication settings - latest
ntuthukomsane c61ab10
Merge branch 'main' of https://github.com/ntuthukomsane-boxfusion/she…
ntuthukomsane 2c55894
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 05bd124
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 6318512
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 5203870
remove unnecessary migration
ntuthukomsane e161ee6
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane ec4852d
resolve conflicts
ntuthukomsane 8f55ab7
remove commented code
ntuthukomsane dc7f3a4
Update shesha-core/src/Shesha.Framework/Configuration/Security/Fronte…
ntuthukomsane-boxfusion e9fe134
Update shesha-core/src/Shesha.Framework/Configuration/Security/Fronte…
ntuthukomsane-boxfusion 26c55cd
Update shesha-core/src/Shesha.Framework/Configuration/Security/Fronte…
ntuthukomsane-boxfusion 950bced
Update shesha-core/src/Shesha.Application/Authorization/Settings/Dto/…
ntuthukomsane-boxfusion b29eff5
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion d715901
Merge branch 'main' of https://github.com/ntuthukomsane-boxfusion/she…
ntuthukomsane 74723f7
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane ab40775
authorization dto
ntuthukomsane b9b168d
resolve AuthorizationSettingsAppService comments
ntuthukomsane 09ba80c
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 810e045
Merge branch 'main' of https://github.com/ntuthukomsane-boxfusion/she…
ntuthukomsane 207c740
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane 69cbae0
resolve code rabbit comments
ntuthukomsane 1f6c12d
resolve authorization app service comments
ntuthukomsane e542efc
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 31297eb
Update shesha-core/src/Shesha.Application/Authorization/Settings/Auth…
ntuthukomsane-boxfusion ababb1c
fix auto mapper
ntuthukomsane d628295
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane ebd6f3b
Update shesha-core/src/Shesha.Application/Authorization/Settings/Auth…
ntuthukomsane-boxfusion f128401
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 3d00301
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion cec5d2b
package shaconfigs as one file
ntuthukomsane dd84682
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane 624fcab
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion 105d7a2
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion e2ef484
migrate old authentication settings and fix mapping profile
ntuthukomsane bb05aac
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane b4a197f
resolve code rabbit comments
ntuthukomsane d07dc07
Merge branch 'shesha-io:main' into ntuthuko/consolidate-authenticatio…
ntuthukomsane-boxfusion c8d162c
Shesha.Security
ntuthukomsane 942ac0b
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane 622cc51
add condition for postgres migration
ntuthukomsane 1ab63f5
Update shesha-core/src/Shesha.Framework/Migrations/M20251215130900.cs
ntuthukomsane-boxfusion 2d8075a
postgres migration fix
ntuthukomsane 06fbf6e
Merge branch 'ntuthuko/consolidate-authentication-settings' of https:…
ntuthukomsane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
87 changes: 46 additions & 41 deletions
87
shesha-core/src/Shesha.Application/Authorization/Settings/AuthorizationSettingsAppService.cs
This file contains hidden or 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 hidden or 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
Binary file added
BIN
+8.33 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1012.shaconfig
Binary file not shown.
Binary file added
BIN
+6.22 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1013.shaconfig
Binary file not shown.
Binary file added
BIN
+3.15 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1014.shaconfig
Binary file not shown.
Binary file added
BIN
+6.39 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1015.shaconfig
Binary file not shown.
Binary file added
BIN
+1.99 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1016.shaconfig
Binary file not shown.
Binary file added
BIN
+1.77 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1017.shaconfig
Binary file not shown.
Binary file added
BIN
+2.32 KB
shesha-core/src/Shesha.Application/ConfigMigrations/package20251208_1018.shaconfig
Binary file not shown.
This file contains hidden or 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
20 changes: 0 additions & 20 deletions
20
shesha-core/src/Shesha.Application/Otp/Configuration/IOtpSettings.cs
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
shesha-core/src/Shesha.Application/Otp/Configuration/OtpSettings.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,32 +1,33 @@ | ||
| using Abp.Dependency; | ||
| using Shesha.Otp.Configuration; | ||
| using System; | ||
| using System; | ||
| using System.Text; | ||
| using Abp.Dependency; | ||
| using Shesha.Configuration.Security.Frontend; | ||
|
|
||
| namespace Shesha.Otp | ||
| { | ||
| public class OtpGenerator: IOtpGenerator, ITransientDependency | ||
| { | ||
| private readonly IOtpSettings _settings; | ||
| private readonly IUserManagementSettings _userManagementSettings; | ||
|
|
||
| public OtpGenerator(IOtpSettings settings) | ||
| public OtpGenerator(IUserManagementSettings userManagementSettings) | ||
| { | ||
| _settings = settings; | ||
| _userManagementSettings = userManagementSettings; | ||
| } | ||
|
|
||
| public string GeneratePin() | ||
| { | ||
| var random = new Random(); | ||
| var password = string.Empty; | ||
| var password = new StringBuilder(); | ||
|
|
||
| var alphabet = _settings.OneTimePins.GetValue().Alphabet; | ||
| var passwordLength = _settings.OneTimePins.GetValue().PasswordLength; | ||
| var alphabet = _userManagementSettings.DefaultAuthentication.GetValue().Alphabet; | ||
| var passwordLength = _userManagementSettings.DefaultAuthentication.GetValue().PasswordLength; | ||
|
|
||
| for (int i = 0; i < passwordLength; i++) | ||
| { | ||
| password += alphabet[random.Next(alphabet.Length)]; | ||
| password.Append(alphabet[random.Next(alphabet.Length)]); | ||
| } | ||
|
|
||
| return password; | ||
| return password.ToString(); | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.