1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
package org.kuali.student.lum.kim; |
20 |
|
|
21 |
|
import java.security.GeneralSecurityException; |
22 |
|
|
23 |
|
import javax.jws.WebService; |
24 |
|
|
25 |
|
import org.kuali.rice.core.service.EncryptionService; |
26 |
|
import org.kuali.rice.kim.bo.entity.dto.KimPrincipalInfo; |
27 |
|
import org.kuali.rice.kim.service.IdentityService; |
28 |
|
import org.kuali.rice.kim.service.impl.IdentityServiceImpl; |
29 |
|
import org.kuali.rice.kim.util.KIMWebServiceConstants; |
30 |
|
import org.kuali.rice.kns.service.KNSServiceLocator; |
31 |
|
import org.kuali.rice.kns.service.impl.DocumentServiceImpl; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
@author |
38 |
|
|
39 |
|
|
40 |
|
@WebService(endpointInterface = KIMWebServiceConstants.IdentityService.INTERFACE_CLASS, serviceName = KIMWebServiceConstants.IdentityService.WEB_SERVICE_NAME, portName = KIMWebServiceConstants.IdentityService.WEB_SERVICE_PORT, targetNamespace = KIMWebServiceConstants.MODULE_TARGET_NAMESPACE) |
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.33 |
|
41 |
|
public class StudentIdentityServiceImpl extends IdentityServiceImpl implements IdentityService { |
42 |
|
private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DocumentServiceImpl.class); |
43 |
|
|
44 |
|
|
45 |
|
@see |
46 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.33 |
|
47 |
0
|
@Override... |
48 |
|
public KimPrincipalInfo getPrincipalByPrincipalNameAndPassword(String principalName, String password) { |
49 |
0
|
try { |
50 |
0
|
String finalPassword = KNSServiceLocator.getEncryptionService().hash(password)+ EncryptionService.HASH_POST_PREFIX; |
51 |
0
|
return super.getPrincipalByPrincipalNameAndPassword(principalName, finalPassword); |
52 |
|
} catch (GeneralSecurityException e) { |
53 |
0
|
String message = "Caught Exception attempting to encrypt password (with length " + password.length() + ") for principalName: " + principalName; |
54 |
0
|
LOG.error(message, e); |
55 |
0
|
throw new RuntimeException(e); |
56 |
|
} |
57 |
|
} |
58 |
|
|
59 |
|
} |