Search in sources :

Example 11 with OAuthConsumerAppDTO

use of org.wso2.carbon.identity.oauth.dto.OAuthConsumerAppDTO in project carbon-apimgt by wso2.

the class SessionDataPublisherImpl method buildConsumerAppDTO.

/**
 * Method to build a OAuthConsumerAppDTO type object
 * @param appDO required param
 * @return OAuthConsumerAppDTO type object
 */
private OAuthConsumerAppDTO buildConsumerAppDTO(OAuthAppDO appDO) {
    OAuthConsumerAppDTO dto = new OAuthConsumerAppDTO();
    dto.setApplicationName(appDO.getApplicationName());
    dto.setCallbackUrl(appDO.getCallbackUrl());
    dto.setOauthConsumerKey(appDO.getOauthConsumerKey());
    dto.setOauthConsumerSecret(appDO.getOauthConsumerSecret());
    dto.setOAuthVersion(appDO.getOauthVersion());
    dto.setGrantTypes(appDO.getGrantTypes());
    dto.setScopeValidators(appDO.getScopeValidators());
    dto.setUsername(appDO.getAppOwner().toFullQualifiedUsername());
    dto.setState(appDO.getState());
    dto.setPkceMandatory(appDO.isPkceMandatory());
    dto.setPkceSupportPlain(appDO.isPkceSupportPlain());
    dto.setUserAccessTokenExpiryTime(appDO.getUserAccessTokenExpiryTime());
    dto.setApplicationAccessTokenExpiryTime(appDO.getApplicationAccessTokenExpiryTime());
    dto.setRefreshTokenExpiryTime(appDO.getRefreshTokenExpiryTime());
    dto.setIdTokenExpiryTime(appDO.getIdTokenExpiryTime());
    dto.setAudiences(appDO.getAudiences());
    dto.setRequestObjectSignatureValidationEnabled(appDO.isRequestObjectSignatureValidationEnabled());
    dto.setIdTokenEncryptionEnabled(appDO.isIdTokenEncryptionEnabled());
    dto.setIdTokenEncryptionAlgorithm(appDO.getIdTokenEncryptionAlgorithm());
    dto.setIdTokenEncryptionMethod(appDO.getIdTokenEncryptionMethod());
    dto.setBackChannelLogoutUrl(appDO.getBackChannelLogoutUrl());
    dto.setTokenType(appDO.getTokenType());
    dto.setBypassClientCredentials(appDO.isBypassClientCredentials());
    return dto;
}
Also used : OAuthConsumerAppDTO(org.wso2.carbon.identity.oauth.dto.OAuthConsumerAppDTO)

Aggregations

OAuthConsumerAppDTO (org.wso2.carbon.identity.oauth.dto.OAuthConsumerAppDTO)6 OAuthConsumerAppDTO (org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO)5 IdentityOAuthAdminException (org.wso2.carbon.identity.oauth.IdentityOAuthAdminException)4 HashMap (java.util.HashMap)3 PCRException (com.wso2telco.core.pcrservice.exception.PCRException)2 AiravataSecurityException (org.apache.airavata.security.AiravataSecurityException)2 APIMgtDAOException (org.wso2.carbon.apimgt.api.APIMgtDAOException)2 OAuthApplicationInfo (org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo)2 SystemApplicationDAO (org.wso2.carbon.apimgt.impl.dao.SystemApplicationDAO)2 SystemApplicationDTO (org.wso2.carbon.apimgt.impl.dto.SystemApplicationDTO)2 IdentityApplicationManagementException (org.wso2.carbon.identity.application.common.IdentityApplicationManagementException)2 OAuthAdminService (org.wso2.carbon.identity.oauth.OAuthAdminService)2 IdentityOAuth2Exception (org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception)2 AccessTokenDO (org.wso2.carbon.identity.oauth2.model.AccessTokenDO)2 KeyValueBasedPcrDAOImpl (com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl)1 RemoteException (java.rmi.RemoteException)1 List (java.util.List)1 Scanner (java.util.Scanner)1 Cache (javax.cache.Cache)1 Airavata (org.apache.airavata.api.Airavata)1