-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor grant handling with strategy pattern
Implemented a strategy pattern to generalize grant handling in the Authly module, enhancing flexibility and maintainability. Introduced an abstract `GrantStrategy` module and encapsulated specific grant logic into dedicated classes, now adhering to the strategy interface. This approach reduces redundancy by delegating authorization checks to respective strategy implementations. Additionally, a factory method was introduced for strategy creation based on grant type, streamlining grant instantiation and ensuring unsupported grant types are properly handled. This refactor aims to improve system design coherence and extensibility.
- Loading branch information
Showing
5 changed files
with
51 additions
and
49 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
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