-
Notifications
You must be signed in to change notification settings - Fork 8k
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(dashboard): use AuthConfiguration to manage bean of auth #2059
refactor(dashboard): use AuthConfiguration to manage bean of auth #2059
Conversation
…uration for testing
...nel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/AuthConfiguration.java
Show resolved
Hide resolved
...d/src/main/java/com/alibaba/csp/sentinel/dashboard/auth/DefaultAuthorizationInterceptor.java
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.
LGTM
After refactoring, it's convenient for users to customize their own implementation of AuthService
,LoginAuthenticationFilter
,AuthorizationInterceptor
, the dashboard module becomes more extensible. The idea of interface design and auto configuration is smart.
Thanks! @Anilople
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
Nice work. Thanks for contributing and look forward to more! |
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
…ns (alibaba#2059) * refactor(dashboard): use AuthConfiguration to manage the bean of auth * refactor(dashboard): change AuthorizationInterceptor to an interface * refactor(dashboard): change LoginAuthenticationFilter to an interface * refactor(dashboard): use AuthProperties to manage auth config * test(dashboard): use NoAuthConfigurationTest to create no auth configuration for testing
* fix DefaultLitePullConsumerImpl NPE * add ut
Describe what this PR does / why we need it
That will make auth module more flexible.
Does this pull request fix one issue?
#2053
Describe how you did it
Use
AuthConfiguration
to manage bean under packagecom.alibaba.csp.sentinel.dashboard.auth
.Change
AuthorizationInterceptor
to an interface, and support a default implementation.Change
LoginAuthenticationFilter
to an interface, and support a default implementation.Describe how to verify it
The beans are created successfully, and not break old testes.
Special notes for reviews