mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
This commit is contained in:
commit
f8a2117911
@ -7,6 +7,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
|
||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
||||
import org.wso2.carbon.device.mgt.core.scep.SCEPException;
|
||||
import org.wso2.carbon.device.mgt.core.scep.SCEPManager;
|
||||
import org.wso2.carbon.device.mgt.core.scep.TenantedDeviceWrapper;
|
||||
@ -68,6 +69,14 @@ public class CertificateAuthenticator implements WebappAuthenticator {
|
||||
TenantedDeviceWrapper tenantedDeviceWrapper = scepManager.getValidatedDevice(deviceIdentifier);
|
||||
authenticationInfo.setTenantDomain(tenantedDeviceWrapper.getTenantDomain());
|
||||
authenticationInfo.setTenantId(tenantedDeviceWrapper.getTenantId());
|
||||
|
||||
if(tenantedDeviceWrapper.getDevice() != null &&
|
||||
tenantedDeviceWrapper.getDevice().getEnrolmentInfo() != null) {
|
||||
|
||||
EnrolmentInfo enrolmentInfo = tenantedDeviceWrapper.getDevice().getEnrolmentInfo();
|
||||
authenticationInfo.setUsername(enrolmentInfo.getOwner());
|
||||
}
|
||||
|
||||
authenticationInfo.setStatus(Status.CONTINUE);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user