├── .config
└── dotnet-tools.json
├── .editorconfig
├── .gitattributes
├── .github
├── FUNDING.yml
├── dependabot.yml
├── issue_template.md
├── lock.yml
└── workflows
│ ├── build.yml
│ ├── codeql.yml
│ └── codeql
│ └── codeql-config.yml
├── .gitignore
├── ASPNETCore2CookieAuthentication.sln
├── BannedSymbols.txt
├── Directory.Build.props
├── Directory.Packages.props
├── LICENSE.md
├── README.md
├── _buid.cmd
├── common
└── AssemblyInfo.cs
├── global.json
├── src
├── ASPNETCore2CookieAuthentication.Common
│ └── ASPNETCore2CookieAuthentication.Common.csproj
├── ASPNETCore2CookieAuthentication.DataLayer
│ ├── ASPNETCore2CookieAuthentication.DataLayer.csproj
│ ├── Context
│ │ ├── ApplicationDbContext.cs
│ │ ├── ApplicationDbContextFactory.cs
│ │ └── IUnitOfWork.cs
│ ├── Migrations
│ │ ├── .editorconfig
│ │ ├── 20230303073041_V2023_03_03_1100.Designer.cs
│ │ ├── 20230303073041_V2023_03_03_1100.cs
│ │ └── ApplicationDbContextModelSnapshot.cs
│ ├── _01-add_migrations.cmd
│ └── _02-update_db.cmd
├── ASPNETCore2CookieAuthentication.DomainClasses
│ ├── ASPNETCore2CookieAuthentication.DomainClasses.csproj
│ ├── Role.cs
│ ├── User.cs
│ └── UserRole.cs
├── ASPNETCore2CookieAuthentication.Services
│ ├── ASPNETCore2CookieAuthentication.Services.csproj
│ ├── CookieValidatorService.cs
│ ├── CustomRoles.cs
│ ├── DbInitializerService.cs
│ ├── DeviceDetectionService.cs
│ ├── ICookieValidatorService.cs
│ ├── IDbInitializerService.cs
│ ├── IDeviceDetectionService.cs
│ ├── IRolesService.cs
│ ├── ISecurityService.cs
│ ├── IUsersService.cs
│ ├── RolesService.cs
│ ├── SecurityService.cs
│ └── UsersService.cs
└── ASPNETCore2CookieAuthentication.WebApp
│ ├── ASPNETCore2CookieAuthentication.WebApp.csproj
│ ├── Controllers
│ ├── AccountController.cs
│ ├── MyProtectedAdminApiController.cs
│ └── MyProtectedApiController.cs
│ ├── Program.cs
│ ├── Properties
│ └── launchSettings.json
│ ├── _0-restore.bat
│ ├── _1-dotnet_run.bat
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── libman.json
│ └── wwwroot
│ ├── favicon.ico
│ ├── images
│ └── cookieauth.png
│ ├── index.html
│ └── lib
│ ├── bootstrap
│ ├── LICENSE
│ ├── README.md
│ ├── dist
│ │ ├── css
│ │ │ ├── bootstrap-grid.css
│ │ │ ├── bootstrap-grid.css.map
│ │ │ ├── bootstrap-grid.min.css
│ │ │ ├── bootstrap-grid.min.css.map
│ │ │ ├── bootstrap-grid.rtl.css
│ │ │ ├── bootstrap-grid.rtl.css.map
│ │ │ ├── bootstrap-grid.rtl.min.css
│ │ │ ├── bootstrap-grid.rtl.min.css.map
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── bootstrap-reboot.css.map
│ │ │ ├── bootstrap-reboot.min.css
│ │ │ ├── bootstrap-reboot.min.css.map
│ │ │ ├── bootstrap-reboot.rtl.css
│ │ │ ├── bootstrap-reboot.rtl.css.map
│ │ │ ├── bootstrap-reboot.rtl.min.css
│ │ │ ├── bootstrap-reboot.rtl.min.css.map
│ │ │ ├── bootstrap-utilities.css
│ │ │ ├── bootstrap-utilities.css.map
│ │ │ ├── bootstrap-utilities.min.css
│ │ │ ├── bootstrap-utilities.min.css.map
│ │ │ ├── bootstrap-utilities.rtl.css
│ │ │ ├── bootstrap-utilities.rtl.css.map
│ │ │ ├── bootstrap-utilities.rtl.min.css
│ │ │ ├── bootstrap-utilities.rtl.min.css.map
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ ├── bootstrap.min.css.map
│ │ │ ├── bootstrap.rtl.css
│ │ │ ├── bootstrap.rtl.css.map
│ │ │ ├── bootstrap.rtl.min.css
│ │ │ └── bootstrap.rtl.min.css.map
│ │ └── js
│ │ │ ├── bootstrap.bundle.js
│ │ │ ├── bootstrap.bundle.js.map
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ ├── bootstrap.esm.js
│ │ │ ├── bootstrap.esm.js.map
│ │ │ ├── bootstrap.esm.min.js
│ │ │ ├── bootstrap.esm.min.js.map
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.js.map
│ │ │ ├── bootstrap.min.js
│ │ │ └── bootstrap.min.js.map
│ ├── js
│ │ ├── dist
│ │ │ ├── alert.js
│ │ │ ├── alert.js.map
│ │ │ ├── base-component.js
│ │ │ ├── base-component.js.map
│ │ │ ├── button.js
│ │ │ ├── button.js.map
│ │ │ ├── carousel.js
│ │ │ ├── carousel.js.map
│ │ │ ├── collapse.js
│ │ │ ├── collapse.js.map
│ │ │ ├── dom
│ │ │ │ ├── data.js
│ │ │ │ ├── data.js.map
│ │ │ │ ├── event-handler.js
│ │ │ │ ├── event-handler.js.map
│ │ │ │ ├── manipulator.js
│ │ │ │ ├── manipulator.js.map
│ │ │ │ ├── selector-engine.js
│ │ │ │ └── selector-engine.js.map
│ │ │ ├── dropdown.js
│ │ │ ├── dropdown.js.map
│ │ │ ├── modal.js
│ │ │ ├── modal.js.map
│ │ │ ├── offcanvas.js
│ │ │ ├── offcanvas.js.map
│ │ │ ├── popover.js
│ │ │ ├── popover.js.map
│ │ │ ├── scrollspy.js
│ │ │ ├── scrollspy.js.map
│ │ │ ├── tab.js
│ │ │ ├── tab.js.map
│ │ │ ├── toast.js
│ │ │ ├── toast.js.map
│ │ │ ├── tooltip.js
│ │ │ ├── tooltip.js.map
│ │ │ └── util
│ │ │ │ ├── backdrop.js
│ │ │ │ ├── backdrop.js.map
│ │ │ │ ├── component-functions.js
│ │ │ │ ├── component-functions.js.map
│ │ │ │ ├── config.js
│ │ │ │ ├── config.js.map
│ │ │ │ ├── focustrap.js
│ │ │ │ ├── focustrap.js.map
│ │ │ │ ├── index.js
│ │ │ │ ├── index.js.map
│ │ │ │ ├── sanitizer.js
│ │ │ │ ├── sanitizer.js.map
│ │ │ │ ├── scrollbar.js
│ │ │ │ ├── scrollbar.js.map
│ │ │ │ ├── swipe.js
│ │ │ │ ├── swipe.js.map
│ │ │ │ ├── template-factory.js
│ │ │ │ └── template-factory.js.map
│ │ └── src
│ │ │ ├── alert.js
│ │ │ ├── base-component.js
│ │ │ ├── button.js
│ │ │ ├── carousel.js
│ │ │ ├── collapse.js
│ │ │ ├── dom
│ │ │ ├── data.js
│ │ │ ├── event-handler.js
│ │ │ ├── manipulator.js
│ │ │ └── selector-engine.js
│ │ │ ├── dropdown.js
│ │ │ ├── modal.js
│ │ │ ├── offcanvas.js
│ │ │ ├── popover.js
│ │ │ ├── scrollspy.js
│ │ │ ├── tab.js
│ │ │ ├── toast.js
│ │ │ ├── tooltip.js
│ │ │ └── util
│ │ │ ├── backdrop.js
│ │ │ ├── component-functions.js
│ │ │ ├── config.js
│ │ │ ├── focustrap.js
│ │ │ ├── index.js
│ │ │ ├── sanitizer.js
│ │ │ ├── scrollbar.js
│ │ │ ├── swipe.js
│ │ │ └── template-factory.js
│ ├── package.json
│ └── scss
│ │ ├── _accordion.scss
│ │ ├── _alert.scss
│ │ ├── _badge.scss
│ │ ├── _breadcrumb.scss
│ │ ├── _button-group.scss
│ │ ├── _buttons.scss
│ │ ├── _card.scss
│ │ ├── _carousel.scss
│ │ ├── _close.scss
│ │ ├── _containers.scss
│ │ ├── _dropdown.scss
│ │ ├── _forms.scss
│ │ ├── _functions.scss
│ │ ├── _grid.scss
│ │ ├── _helpers.scss
│ │ ├── _images.scss
│ │ ├── _list-group.scss
│ │ ├── _maps.scss
│ │ ├── _mixins.scss
│ │ ├── _modal.scss
│ │ ├── _nav.scss
│ │ ├── _navbar.scss
│ │ ├── _offcanvas.scss
│ │ ├── _pagination.scss
│ │ ├── _placeholders.scss
│ │ ├── _popover.scss
│ │ ├── _progress.scss
│ │ ├── _reboot.scss
│ │ ├── _root.scss
│ │ ├── _spinners.scss
│ │ ├── _tables.scss
│ │ ├── _toasts.scss
│ │ ├── _tooltip.scss
│ │ ├── _transitions.scss
│ │ ├── _type.scss
│ │ ├── _utilities.scss
│ │ ├── _variables.scss
│ │ ├── bootstrap-grid.scss
│ │ ├── bootstrap-reboot.scss
│ │ ├── bootstrap-utilities.scss
│ │ ├── bootstrap.scss
│ │ ├── forms
│ │ ├── _floating-labels.scss
│ │ ├── _form-check.scss
│ │ ├── _form-control.scss
│ │ ├── _form-range.scss
│ │ ├── _form-select.scss
│ │ ├── _form-text.scss
│ │ ├── _input-group.scss
│ │ ├── _labels.scss
│ │ └── _validation.scss
│ │ ├── helpers
│ │ ├── _clearfix.scss
│ │ ├── _color-bg.scss
│ │ ├── _colored-links.scss
│ │ ├── _position.scss
│ │ ├── _ratio.scss
│ │ ├── _stacks.scss
│ │ ├── _stretched-link.scss
│ │ ├── _text-truncation.scss
│ │ ├── _visually-hidden.scss
│ │ └── _vr.scss
│ │ ├── mixins
│ │ ├── _alert.scss
│ │ ├── _backdrop.scss
│ │ ├── _banner.scss
│ │ ├── _border-radius.scss
│ │ ├── _box-shadow.scss
│ │ ├── _breakpoints.scss
│ │ ├── _buttons.scss
│ │ ├── _caret.scss
│ │ ├── _clearfix.scss
│ │ ├── _color-scheme.scss
│ │ ├── _container.scss
│ │ ├── _deprecate.scss
│ │ ├── _forms.scss
│ │ ├── _gradients.scss
│ │ ├── _grid.scss
│ │ ├── _image.scss
│ │ ├── _list-group.scss
│ │ ├── _lists.scss
│ │ ├── _pagination.scss
│ │ ├── _reset-text.scss
│ │ ├── _resize.scss
│ │ ├── _table-variants.scss
│ │ ├── _text-truncate.scss
│ │ ├── _transition.scss
│ │ ├── _utilities.scss
│ │ └── _visually-hidden.scss
│ │ ├── utilities
│ │ └── _api.scss
│ │ └── vendor
│ │ └── _rfs.scss
│ └── jquery
│ ├── AUTHORS.txt
│ ├── LICENSE.txt
│ ├── README.md
│ ├── bower.json
│ ├── dist
│ ├── jquery.js
│ ├── jquery.min.js
│ ├── jquery.min.map
│ ├── jquery.slim.js
│ ├── jquery.slim.min.js
│ └── jquery.slim.min.map
│ ├── external
│ └── sizzle
│ │ ├── LICENSE.txt
│ │ └── dist
│ │ ├── sizzle.js
│ │ ├── sizzle.min.js
│ │ └── sizzle.min.map
│ ├── package.json
│ └── src
│ ├── ajax.js
│ ├── ajax
│ ├── jsonp.js
│ ├── load.js
│ ├── script.js
│ ├── var
│ │ ├── location.js
│ │ ├── nonce.js
│ │ └── rquery.js
│ └── xhr.js
│ ├── attributes.js
│ ├── attributes
│ ├── attr.js
│ ├── classes.js
│ ├── prop.js
│ ├── support.js
│ └── val.js
│ ├── callbacks.js
│ ├── core.js
│ ├── core
│ ├── DOMEval.js
│ ├── access.js
│ ├── camelCase.js
│ ├── init.js
│ ├── isAttached.js
│ ├── nodeName.js
│ ├── parseHTML.js
│ ├── parseXML.js
│ ├── ready-no-deferred.js
│ ├── ready.js
│ ├── readyException.js
│ ├── stripAndCollapse.js
│ ├── support.js
│ ├── toType.js
│ └── var
│ │ └── rsingleTag.js
│ ├── css.js
│ ├── css
│ ├── addGetHookIf.js
│ ├── adjustCSS.js
│ ├── curCSS.js
│ ├── finalPropName.js
│ ├── hiddenVisibleSelectors.js
│ ├── showHide.js
│ ├── support.js
│ └── var
│ │ ├── cssExpand.js
│ │ ├── getStyles.js
│ │ ├── isHiddenWithinTree.js
│ │ ├── rboxStyle.js
│ │ ├── rcustomProp.js
│ │ ├── rnumnonpx.js
│ │ └── swap.js
│ ├── data.js
│ ├── data
│ ├── Data.js
│ └── var
│ │ ├── acceptData.js
│ │ ├── dataPriv.js
│ │ └── dataUser.js
│ ├── deferred.js
│ ├── deferred
│ └── exceptionHook.js
│ ├── deprecated.js
│ ├── deprecated
│ ├── ajax-event-alias.js
│ └── event.js
│ ├── dimensions.js
│ ├── effects.js
│ ├── effects
│ ├── Tween.js
│ └── animatedSelector.js
│ ├── event.js
│ ├── event
│ ├── focusin.js
│ ├── support.js
│ └── trigger.js
│ ├── exports
│ ├── amd.js
│ └── global.js
│ ├── jquery.js
│ ├── manipulation.js
│ ├── manipulation
│ ├── _evalUrl.js
│ ├── buildFragment.js
│ ├── getAll.js
│ ├── setGlobalEval.js
│ ├── support.js
│ ├── var
│ │ ├── rscriptType.js
│ │ └── rtagName.js
│ └── wrapMap.js
│ ├── offset.js
│ ├── queue.js
│ ├── queue
│ └── delay.js
│ ├── selector-native.js
│ ├── selector-sizzle.js
│ ├── selector.js
│ ├── serialize.js
│ ├── traversing.js
│ ├── traversing
│ ├── findFilter.js
│ └── var
│ │ ├── dir.js
│ │ ├── rneedsContext.js
│ │ └── siblings.js
│ ├── var
│ ├── ObjectFunctionString.js
│ ├── arr.js
│ ├── class2type.js
│ ├── document.js
│ ├── documentElement.js
│ ├── flat.js
│ ├── fnToString.js
│ ├── getProto.js
│ ├── hasOwn.js
│ ├── indexOf.js
│ ├── isFunction.js
│ ├── isWindow.js
│ ├── pnum.js
│ ├── push.js
│ ├── rcheckableType.js
│ ├── rcssNum.js
│ ├── rnothtmlwhite.js
│ ├── rtrimCSS.js
│ ├── slice.js
│ ├── support.js
│ ├── toString.js
│ └── whitespace.js
│ └── wrap.js
├── tag-it.bat
└── update-dependencies.bat
/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "dotnet-ef": {
6 | "version": "9.0.0",
7 | "commands": [
8 | "dotnet-ef"
9 | ]
10 | },
11 | "microsoft.web.librarymanager.cli": {
12 | "version": "2.1.175",
13 | "commands": [
14 | "libman"
15 | ]
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://www.coffeete.ir/vnasiri', 'https://www.buymeacoffee.com/vahidn']
13 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: nuget
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 | open-pull-requests-limit: 10
8 | groups:
9 | tests:
10 | patterns: ["*"]
11 | update-types: ["minor", "patch"]
12 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | # Summary of the issue
2 |
3 |
4 |
5 | ## Environment
6 |
7 | ```
8 | .NET Core version:
9 | ```
10 |
11 | ## Example code/Steps to reproduce:
12 |
13 | ```
14 | paste your core code
15 | ```
16 |
17 | ## Output:
18 |
19 | ```
20 | Exception message:
21 | Full Stack trace:
22 | ```
23 |
24 |
--------------------------------------------------------------------------------
/.github/lock.yml:
--------------------------------------------------------------------------------
1 | daysUntilLock: 90
2 |
3 | skipCreatedBefore: false
4 |
5 | exemptLabels: []
6 |
7 | lockLabel: false
8 |
9 | lockComment: >
10 | This thread has been automatically locked since there has not been
11 | any recent activity after it was closed. Please open a new issue for
12 | related problems.
13 |
14 | setLockReason: true
15 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: .NET Core Build
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v4
12 | - name: Setup .NET Core
13 | uses: actions/setup-dotnet@v3
14 | with:
15 | dotnet-version: 9.0.x
16 | - name: Build ASPNETCore2CookieAuthentication
17 | run: dotnet build ./src/ASPNETCore2CookieAuthentication.WebApp/ASPNETCore2CookieAuthentication.WebApp.csproj --configuration Release
--------------------------------------------------------------------------------
/.github/workflows/codeql/codeql-config.yml:
--------------------------------------------------------------------------------
1 | name: "Security and Quality"
2 |
3 | queries:
4 | - uses: security-and-quality
5 |
6 | query-filters:
7 | - exclude:
8 | id: cs/useless-if-statement
9 | - exclude:
10 | id: cs/empty-block
11 |
--------------------------------------------------------------------------------
/BannedSymbols.txt:
--------------------------------------------------------------------------------
1 | # https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md
2 | P:System.DateTime.Now;Use System.DateTime.UtcNow instead
3 | P:System.DateTimeOffset.Now;Use System.DateTimeOffset.UtcNow instead
4 | P:System.DateTimeOffset.DateTime;Use System.DateTimeOffset.UtcDateTime instead
5 |
--------------------------------------------------------------------------------
/Directory.Packages.props:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |