Search in sources :

Example 1 with KeyManagerInfoDTO

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;
}
Also used : CredentialsDTO(org.wso2.carbon.apimgt.rest.api.core.dto.CredentialsDTO) KeyManagerInfoDTO(org.wso2.carbon.apimgt.rest.api.core.dto.KeyManagerInfoDTO)

Aggregations

CredentialsDTO (org.wso2.carbon.apimgt.rest.api.core.dto.CredentialsDTO)1 KeyManagerInfoDTO (org.wso2.carbon.apimgt.rest.api.core.dto.KeyManagerInfoDTO)1