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(gateway): create abstractions #9726

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phiz71
Copy link
Member

@phiz71 phiz71 commented Oct 25, 2024

Issue

N/A

Description

Creates:

  • AbstractReactorFactory
  • AbstractPolicyChain
  • AbstractPolicyChainFactory

Use the abstractions in Http classes

Copy link
Member

@ytvnr ytvnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@phiz71 phiz71 marked this pull request as ready for review November 4, 2024 16:22
@phiz71 phiz71 requested a review from a team as a code owner November 4, 2024 16:22
Comment on lines +103 to +107
protected abstract Maybe<SecurityToken> extractSecurityToken(final C executionContext);

protected abstract Completable executeSecurityPolicy(final C ctx, final ExecutionPhase executionPhase);

protected abstract String getSelectionRule(String selectionRule);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to given another point of view. Another way to do it can be to create SecurityPlan<T extends BaseSecurityPolicy, C extends BaseExecutionContext> that take a parameter an object that respect the interface with this 3 methods.
This another way is a composition and is generally present better than inheritence.

But I don't know all history and context of this piece of code

Creates:
 - AbstractSecurityPlan
 - AbstractSecurityChain
 - AbstractReactorFactory
 - AbstractPolicyChain
 - AbstractPolicyChainFactory
@phiz71 phiz71 marked this pull request as draft November 12, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants