Commit 5051bf0
authored
[ZEPPELIN-6251] Refactor AuthenticationService binding using factory method
### What is this PR for?
This PR refactors the conditional binding logic for AuthenticationService in ZeppelinServer.java.
Previously, the binding decision between ShiroAuthenticationService and NoAuthenticationService was handled via an inline if-else block.
To improve readability and maintainability, this logic has been moved to a new AuthenticationServiceFactory class that encapsulates the decision process.
This change simplifies the server initialization logic and promotes better separation of concerns.
### What type of PR is it?
Refactoring
### Todos
* [x] - Add AuthenticationServiceFactory class
* [x] - Replace inline if-else binding logic in ZeppelinServer
### What is the Jira issue?
* Jira: https://issues.apache.org/jira/browse/ZEPPELIN-6251
### How should this be tested?
There should be no functional change.
### Screenshots (if appropriate)
N/A
### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.
Closes #4988 from ParkGyeongTae/ZEPPELIN-6251.
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>1 parent e4f4cc8 commit 5051bf0
File tree
2 files changed
+38
-7
lines changed- zeppelin-server/src/main/java/org/apache/zeppelin
- server
- service/auth
2 files changed
+38
-7
lines changedLines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments