Skip to content
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

refactor(jans-auth-server): refactor AuthorizeRestWebServiceImpl #1208

Closed
yuriyz opened this issue Apr 18, 2022 · 1 comment
Closed

refactor(jans-auth-server): refactor AuthorizeRestWebServiceImpl #1208

yuriyz opened this issue Apr 18, 2022 · 1 comment
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-enhancement Issue or PR is an enhancement to an existing functionality

Comments

@yuriyz
Copy link
Contributor

yuriyz commented Apr 18, 2022

Description

Over years authorization logic in AS for authz growth in AuthorizeRestWebServiceImpl with ~1250 lines of code. Code complexity of main authz method is 207 instead of recommended 15. It is going towards maintanence problem.

image

@yuriyz yuriyz added kind-enhancement Issue or PR is an enhancement to an existing functionality comp-jans-auth-server Component affected by issue or PR labels Apr 18, 2022
@yuriyz yuriyz self-assigned this Apr 18, 2022
yuriyz added a commit that referenced this issue Apr 28, 2022
@yuriyz
Copy link
Contributor Author

yuriyz commented May 11, 2022

All sonar issues in AuthorizeRestWebServiceImpl were fixed. Along the way added new AuthzRequest and corresponding AuthzRequestService abstraction which simplified code a lot and allowed to drop gigantic 207 cognitive complexity method.

@yuriyz yuriyz closed this as completed May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-enhancement Issue or PR is an enhancement to an existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant