use of org.wso2.carbon.apimgt.rest.api.core.dto.KeyManagerInfoDTO in project carbon-apimgt by wso2.
the class MappingUtil method toKeyManagerInfoDTO.
/**
* Converts RegistrationSummary key manager information into KeyManagerInfoDTO
*
* @param registrationSummary the registration summary required by gateway
* @return KeyManagerInfoDTO
*/
private static KeyManagerInfoDTO toKeyManagerInfoDTO(RegistrationSummary registrationSummary) {
KeyManagerInfoDTO keyManagerInfoDTO = new KeyManagerInfoDTO();
keyManagerInfoDTO.setDcrEndpoint(registrationSummary.getKeyManagerInfo().getDcrEndpoint());
keyManagerInfoDTO.setIntrospectEndpoint(registrationSummary.getKeyManagerInfo().getIntrospectEndpoint());
keyManagerInfoDTO.setRevokeEndpoint(registrationSummary.getKeyManagerInfo().getRevokeEndpoint());
keyManagerInfoDTO.setTokenEndpoint(registrationSummary.getKeyManagerInfo().getTokenEndpoint());
CredentialsDTO keyManagerCredentials = new CredentialsDTO();
keyManagerCredentials.setUsername(registrationSummary.getKeyManagerInfo().getCredentials().getUsername());
keyManagerCredentials.setPassword(registrationSummary.getKeyManagerInfo().getCredentials().getPassword());
keyManagerInfoDTO.setCredentials(keyManagerCredentials);
return keyManagerInfoDTO;
}
Aggregations