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
feat: add authentication system #4
Merged
Conversation
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
* build: add devDependencies 'dotenv' * build: preload environment variables * build: add dependencies 'mysql2' * feat: add mysql database connection * chore: add example environment variable * refactor: eliminate type 'any' * refactor: add missing modifier * feat: adds Address, Branch model * feat: adds Address,Branch,Machine,Staff,Zone model * feat:adds MainrenanceLog, MaintenanceParts * feat: fix Branch * feat:add MachinePart model * feat: adds Order, Bill model * feat: removes useless constructor, adds pk getter * feat: add pk getter, assign readonly only for pk * refactor: remove unit testing (base code) * refactor: use MYSQL_PASSWORD instead * build: add redis dependency * refactor: database connection with mysql and redis * refactor: add generateRedisUri method * refactor: make some redis environment optional * build: remove unused environment variable * build: add redis's environment variable * feat: add DatabaseEntity Interface * feat: add set pk for Address, Bill, Branch * feat: add set pk for Machine, MachinePart, MLog * feat: add set pk for MPart, Order, Staff, Zone * style: add vscode setting for coding style * refactor: class naming and use path mapping * feat: add regex util * feat: add base code of auth service * feat: add auth service unit test Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com> Co-authored-by: Porping <porsteam@hotmail.com>
riflowth
requested review from
XiaoXuxxxx and
eltfshr
and removed request for
XiaoXuxxxx
April 24, 2022 16:54
LGTM 👍 +4 |
eltfshr
reviewed
Apr 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ❤️🔥
Ok, I will merge it 🚀 |
riflowth
added a commit
that referenced
this pull request
Apr 24, 2022
* fix: this context in controller instance undefined * feat: add cookie management * feat: add sidebar * feat:add searchbar * feat: fix searchbar * feat:finish searchbar ♥ * feat:add layout home page , TwobarChart, AreaChart * refactor: cookie implementation and document * feat:add headless ui and add responesive * feat:fix MachineLog error * feat:fix case bug * feat:delete MachineLog and and Progressing circle * feat: remove gridline form areachart and twobar * feat:add Pagination Errorlog but dont no type of pagination * feat:fix misspell * refactor: eliminate type 'any * feat:fix prevent loading component * feat: reuse components * feat:add Loginpage * feat: add database connector and prepared auth service (#3) * build: add devDependencies 'dotenv' * build: preload environment variables * build: add dependencies 'mysql2' * feat: add mysql database connection * chore: add example environment variable * refactor: eliminate type 'any' * refactor: add missing modifier * feat: adds Address, Branch model * feat: adds Address,Branch,Machine,Staff,Zone model * feat:adds MainrenanceLog, MaintenanceParts * feat: fix Branch * feat:add MachinePart model * feat: adds Order, Bill model * feat: removes useless constructor, adds pk getter * feat: add pk getter, assign readonly only for pk * refactor: remove unit testing (base code) * refactor: use MYSQL_PASSWORD instead * build: add redis dependency * refactor: database connection with mysql and redis * refactor: add generateRedisUri method * refactor: make some redis environment optional * build: remove unused environment variable * build: add redis's environment variable * feat: add DatabaseEntity Interface * feat: add set pk for Address, Bill, Branch * feat: add set pk for Machine, MachinePart, MLog * feat: add set pk for MPart, Order, Staff, Zone * style: add vscode setting for coding style * refactor: class naming and use path mapping * feat: add regex util * feat: add base code of auth service * feat: add auth service unit test Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com> Co-authored-by: Porping <porsteam@hotmail.com> * feat: add not found 404 fallback middleware * feat: add request decorator for basic validation * refactor: remove next function parameter * fix: missing get connection methods * refactor: login method return cookie with sid * refactor: invoke auth service instead of mock * refactor: call express url encoding & json parser * fix: wrong expect (forget to fix after changed) * feat: add auth controller unit test * feat: add DateUtil class * feat: add repository interface * feat: add staff repository, add password in staff * build: add bcrypt depedency * refactor: dependecy inversion for testability * refactor: complete auth service for logging in * refactor: auth service tester with new interface * refactor: entity interface * refactor: database connection for repository * fix: tsconfig annoying warning * feat: add parameter 'readOptions' to read method * refactor: convert to marker interface * feat: add test script on top-level module * feat: add address repository * feat: add zone repository * refactor: clean yarn.lock with yarn install * feat: add machine repository * fix: linting issue * fix: add dateutil * feat:add order repository * refactor: convert to marker interface * feat: add maintenancepart repository * feat: add maintenancelog repository * fix: variable same in database * fix: method typo * refactor: register all repositories * feat: add machinepart repository * feat: add branch repository * feat: add bill repository * refactor: change return type of update and delete * refactor: change return type of concrete classes * refactor: change return type related to interface * typo: fix misspelling words * feat: register alll repositories * refactor: pool typing as mysql like redis * fix: annoying new line * feat: add session entity/repository * fix: fix typos * fix: wrong casing on import * refactor: add sql builder for utility * refactor: use new sql builder for example * refactor: use new sql builder for example * refactor: remove unnecessary json parse * feat: add axios and login state * fix: easy fix when pass undefined into the method * refactor: implement session and logout * refactor: util raw cookie and signed cookie * refactor: controller registration for middleware * build: clean yarn.lock for ci * refactor: auth service unit test * feat: add get staff info route * feat: add validation for readoptions * refactor: remove unnecessary logging * fix: limit and offset must be integer * refactor: clean sourcecode * feat: add number utility class * feat: add optional request body * feat: implement authorization with decorator * refactor: throw meaningful exceception instead Co-authored-by: Porping <porsteam@hotmail.com> Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com>
riflowth
added a commit
that referenced
this pull request
Apr 24, 2022
* fix: this context in controller instance undefined * feat: add cookie management * feat: add sidebar * feat:add searchbar * feat: fix searchbar * feat:finish searchbar ♥ * feat:add layout home page , TwobarChart, AreaChart * refactor: cookie implementation and document * feat:add headless ui and add responesive * feat:fix MachineLog error * feat:fix case bug * feat:delete MachineLog and and Progressing circle * feat: remove gridline form areachart and twobar * feat:add Pagination Errorlog but dont no type of pagination * feat:fix misspell * refactor: eliminate type 'any * feat:fix prevent loading component * feat: reuse components * feat:add Loginpage * feat: add database connector and prepared auth service (#3) * build: add devDependencies 'dotenv' * build: preload environment variables * build: add dependencies 'mysql2' * feat: add mysql database connection * chore: add example environment variable * refactor: eliminate type 'any' * refactor: add missing modifier * feat: adds Address, Branch model * feat: adds Address,Branch,Machine,Staff,Zone model * feat:adds MainrenanceLog, MaintenanceParts * feat: fix Branch * feat:add MachinePart model * feat: adds Order, Bill model * feat: removes useless constructor, adds pk getter * feat: add pk getter, assign readonly only for pk * refactor: remove unit testing (base code) * refactor: use MYSQL_PASSWORD instead * build: add redis dependency * refactor: database connection with mysql and redis * refactor: add generateRedisUri method * refactor: make some redis environment optional * build: remove unused environment variable * build: add redis's environment variable * feat: add DatabaseEntity Interface * feat: add set pk for Address, Bill, Branch * feat: add set pk for Machine, MachinePart, MLog * feat: add set pk for MPart, Order, Staff, Zone * style: add vscode setting for coding style * refactor: class naming and use path mapping * feat: add regex util * feat: add base code of auth service * feat: add auth service unit test Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com> Co-authored-by: Porping <porsteam@hotmail.com> * feat: add not found 404 fallback middleware * feat: add request decorator for basic validation * refactor: remove next function parameter * fix: missing get connection methods * refactor: login method return cookie with sid * refactor: invoke auth service instead of mock * refactor: call express url encoding & json parser * fix: wrong expect (forget to fix after changed) * feat: add auth controller unit test * feat: add DateUtil class * feat: add repository interface * feat: add staff repository, add password in staff * build: add bcrypt depedency * refactor: dependecy inversion for testability * refactor: complete auth service for logging in * refactor: auth service tester with new interface * refactor: entity interface * refactor: database connection for repository * fix: tsconfig annoying warning * feat: add parameter 'readOptions' to read method * refactor: convert to marker interface * feat: add test script on top-level module * feat: add address repository * feat: add zone repository * refactor: clean yarn.lock with yarn install * feat: add machine repository * fix: linting issue * fix: add dateutil * feat:add order repository * refactor: convert to marker interface * feat: add maintenancepart repository * feat: add maintenancelog repository * fix: variable same in database * fix: method typo * refactor: register all repositories * feat: add machinepart repository * feat: add branch repository * feat: add bill repository * refactor: change return type of update and delete * refactor: change return type of concrete classes * refactor: change return type related to interface * typo: fix misspelling words * feat: register alll repositories * refactor: pool typing as mysql like redis * fix: annoying new line * feat: add session entity/repository * fix: fix typos * fix: wrong casing on import * refactor: add sql builder for utility * refactor: use new sql builder for example * refactor: use new sql builder for example * refactor: remove unnecessary json parse * feat: add axios and login state * fix: easy fix when pass undefined into the method * refactor: implement session and logout * refactor: util raw cookie and signed cookie * refactor: controller registration for middleware * build: clean yarn.lock for ci * refactor: auth service unit test * feat: add get staff info route * feat: add validation for readoptions * refactor: remove unnecessary logging * fix: limit and offset must be integer * refactor: clean sourcecode * feat: add number utility class * feat: add optional request body * feat: implement authorization with decorator * refactor: throw meaningful exceception instead Co-authored-by: Porping <porsteam@hotmail.com> Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com>
riflowth
added a commit
that referenced
this pull request
Apr 24, 2022
* fix: this context in controller instance undefined * feat: add cookie management * feat: add sidebar * feat:add searchbar * feat: fix searchbar * feat:finish searchbar ♥ * feat:add layout home page , TwobarChart, AreaChart * refactor: cookie implementation and document * feat:add headless ui and add responesive * feat:fix MachineLog error * feat:fix case bug * feat:delete MachineLog and and Progressing circle * feat: remove gridline form areachart and twobar * feat:add Pagination Errorlog but dont no type of pagination * feat:fix misspell * refactor: eliminate type 'any * feat:fix prevent loading component * feat: reuse components * feat:add Loginpage * feat: add database connector and prepared auth service (#3) * build: add devDependencies 'dotenv' * build: preload environment variables * build: add dependencies 'mysql2' * feat: add mysql database connection * chore: add example environment variable * refactor: eliminate type 'any' * refactor: add missing modifier * feat: adds Address, Branch model * feat: adds Address,Branch,Machine,Staff,Zone model * feat:adds MainrenanceLog, MaintenanceParts * feat: fix Branch * feat:add MachinePart model * feat: adds Order, Bill model * feat: removes useless constructor, adds pk getter * feat: add pk getter, assign readonly only for pk * refactor: remove unit testing (base code) * refactor: use MYSQL_PASSWORD instead * build: add redis dependency * refactor: database connection with mysql and redis * refactor: add generateRedisUri method * refactor: make some redis environment optional * build: remove unused environment variable * build: add redis's environment variable * feat: add DatabaseEntity Interface * feat: add set pk for Address, Bill, Branch * feat: add set pk for Machine, MachinePart, MLog * feat: add set pk for MPart, Order, Staff, Zone * style: add vscode setting for coding style * refactor: class naming and use path mapping * feat: add regex util * feat: add base code of auth service * feat: add auth service unit test Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com> Co-authored-by: Porping <porsteam@hotmail.com> * feat: add not found 404 fallback middleware * feat: add request decorator for basic validation * refactor: remove next function parameter * fix: missing get connection methods * refactor: login method return cookie with sid * refactor: invoke auth service instead of mock * refactor: call express url encoding & json parser * fix: wrong expect (forget to fix after changed) * feat: add auth controller unit test * feat: add DateUtil class * feat: add repository interface * feat: add staff repository, add password in staff * build: add bcrypt depedency * refactor: dependecy inversion for testability * refactor: complete auth service for logging in * refactor: auth service tester with new interface * refactor: entity interface * refactor: database connection for repository * fix: tsconfig annoying warning * feat: add parameter 'readOptions' to read method * refactor: convert to marker interface * feat: add test script on top-level module * feat: add address repository * feat: add zone repository * refactor: clean yarn.lock with yarn install * feat: add machine repository * fix: linting issue * fix: add dateutil * feat:add order repository * refactor: convert to marker interface * feat: add maintenancepart repository * feat: add maintenancelog repository * fix: variable same in database * fix: method typo * refactor: register all repositories * feat: add machinepart repository * feat: add branch repository * feat: add bill repository * refactor: change return type of update and delete * refactor: change return type of concrete classes * refactor: change return type related to interface * typo: fix misspelling words * feat: register alll repositories * refactor: pool typing as mysql like redis * fix: annoying new line * feat: add session entity/repository * fix: fix typos * fix: wrong casing on import * refactor: add sql builder for utility * refactor: use new sql builder for example * refactor: use new sql builder for example * refactor: remove unnecessary json parse * feat: add axios and login state * fix: easy fix when pass undefined into the method * refactor: implement session and logout * refactor: util raw cookie and signed cookie * refactor: controller registration for middleware * build: clean yarn.lock for ci * refactor: auth service unit test * feat: add get staff info route * feat: add validation for readoptions * refactor: remove unnecessary logging * fix: limit and offset must be integer * refactor: clean sourcecode * feat: add number utility class * feat: add optional request body * feat: implement authorization with decorator * refactor: throw meaningful exceception instead * build: add env into container * fix: react dependencies issues Co-authored-by: Porping <porsteam@hotmail.com> Co-authored-by: XiaoXuxxxx <aonrok555@gmail.com> Co-authored-by: eltfshr <puntf2@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes