| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package org.itracker.services.authentication; |
| 20 |
|
|
| 21 |
|
import java.util.Map; |
| 22 |
|
|
| 23 |
|
import org.itracker.services.ConfigurationService; |
| 24 |
|
import org.itracker.services.UserService; |
| 25 |
|
import org.itracker.services.exceptions.AuthenticatorException; |
| 26 |
|
import org.itracker.services.util.AuthenticationConstants; |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 10 |
Complexity Density: 0.77 |
|
| 35 |
|
public abstract class AbstractPluggableAuthenticator |
| 36 |
|
implements PluggableAuthenticator, AuthenticationConstants { |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
private UserService userService = null; |
| 40 |
|
private ConfigurationService configurationService = null; |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
| 47 |
0
|
public void initialize(Map<?, ?> values) {... |
| 48 |
0
|
if(values != null) { |
| 49 |
0
|
Object userService = values.get("userService"); |
| 50 |
0
|
Object configurationService = values.get("configurationService"); |
| 51 |
|
|
| 52 |
0
|
if(userService instanceof UserService) { |
| 53 |
0
|
this.userService = (UserService) userService; |
| 54 |
|
} |
| 55 |
0
|
if(configurationService instanceof ConfigurationService) { |
| 56 |
0
|
this.configurationService = (ConfigurationService) configurationService; |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
@return |
| 65 |
|
@throws |
| 66 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 67 |
0
|
public UserService getUserService() throws AuthenticatorException {... |
| 68 |
0
|
if(userService == null || ! (userService instanceof UserService)) { |
| 69 |
0
|
throw new AuthenticatorException(AuthenticatorException.SYSTEM_ERROR); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
0
|
return userService; |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
@return |
| 80 |
|
@throws |
| 81 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 82 |
0
|
public ConfigurationService getConfigurationService() throws AuthenticatorException {... |
| 83 |
0
|
if(configurationService == null || ! (configurationService instanceof ConfigurationService)) { |
| 84 |
0
|
throw new AuthenticatorException(AuthenticatorException.SYSTEM_ERROR); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
0
|
return configurationService; |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
} |