-
Notifications
You must be signed in to change notification settings - Fork 50
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
base: master
Are you sure you want to change the base?
Conversation
c2440be
to
b6a9eca
Compare
...lers-api/src/main/java/io/gravitee/gateway/reactive/handlers/api/security/SecurityChain.java
Outdated
Show resolved
Hide resolved
...-api/src/main/java/io/gravitee/gateway/reactive/handlers/api/security/plan/SecurityPlan.java
Outdated
Show resolved
Hide resolved
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.
good job!
.../src/main/java/io/gravitee/gateway/reactive/handlers/api/security/AbstractSecurityChain.java
Show resolved
Hide resolved
b6a9eca
to
5be41a8
Compare
protected abstract Maybe<SecurityToken> extractSecurityToken(final C executionContext); | ||
|
||
protected abstract Completable executeSecurityPolicy(final C ctx, final ExecutionPhase executionPhase); | ||
|
||
protected abstract String getSelectionRule(String selectionRule); |
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.
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
5be41a8
to
0dd9a40
Compare
Creates: - AbstractSecurityPlan - AbstractSecurityChain - AbstractReactorFactory - AbstractPolicyChain - AbstractPolicyChainFactory
0dd9a40
to
6de2a29
Compare
Issue
N/A
Description
Creates:
Use the abstractions in
Http
classes