Search in sources :

Example 1 with ClaimMetadataManagementServiceClaimMetadataException

use of org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException in project carbon-identity-framework by wso2.

the class ClaimMetadataAdminClient method removeClaimDialect.

public void removeClaimDialect(String externalClaimDialect) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException {
    try {
        ClaimDialectDTO claimDialect = new ClaimDialectDTO();
        claimDialect.setClaimDialectURI(externalClaimDialect);
        stub.removeClaimDialect(claimDialect);
    } catch (RemoteException e) {
        log.error(e.getMessage(), e);
        throw e;
    } catch (ClaimMetadataManagementServiceClaimMetadataException e) {
        log.error(e.getMessage(), e);
        throw e;
    }
}
Also used : ClaimMetadataManagementServiceClaimMetadataException(org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException) ClaimDialectDTO(org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ClaimDialectDTO) RemoteException(java.rmi.RemoteException)

Example 2 with ClaimMetadataManagementServiceClaimMetadataException

use of org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException in project product-is by wso2.

the class OAuth2ServiceJWTGrantTestCase method changeCountryOIDDialect.

/**
 * Change the OIDC dialect claim for local claim country.
 *
 * @throws RemoteException                                      Remote Exception.
 * @throws ClaimMetadataManagementServiceClaimMetadataException Claim
 *                                                              MetadataManagementServiceClaimMetadataException
 */
private void changeCountryOIDDialect() throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException {
    ClaimMetadataManagementServiceClient claimMetadataManagementServiceClient = new ClaimMetadataManagementServiceClient(backendURL, sessionCookie);
    claimMetadataManagementServiceClient.removeExternalClaim(OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.OIDC_CLAIM_DIALECT, COUNTRY_OIDC_CLAIM);
}
Also used : ClaimMetadataManagementServiceClient(org.wso2.identity.integration.common.clients.claim.metadata.mgt.ClaimMetadataManagementServiceClient)

Example 3 with ClaimMetadataManagementServiceClaimMetadataException

use of org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException in project product-is by wso2.

the class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase method addOIDCClaims.

private void addOIDCClaims(String externalClaim, String localClaim) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException {
    ExternalClaimDTO externalClaimDTO = new ExternalClaimDTO();
    externalClaimDTO.setExternalClaimDialectURI(OIDC_CLAIM_DIALECT);
    externalClaimDTO.setMappedLocalClaimURI(localClaim);
    externalClaimDTO.setExternalClaimURI(externalClaim);
    claimMetadataManagementServiceClient.addExternalClaim(externalClaimDTO);
}
Also used : ExternalClaimDTO(org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ExternalClaimDTO)

Example 4 with ClaimMetadataManagementServiceClaimMetadataException

use of org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException in project product-is by wso2.

the class ClaimMetadataManagementServiceClient method removeClaimDialect.

public void removeClaimDialect(String externalClaimDialect) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException {
    try {
        ClaimDialectDTO claimDialect = new ClaimDialectDTO();
        claimDialect.setClaimDialectURI(externalClaimDialect);
        claimMetadataManagementServiceStub.removeClaimDialect(claimDialect);
    } catch (RemoteException e) {
        throw e;
    } catch (ClaimMetadataManagementServiceClaimMetadataException e) {
        throw e;
    }
}
Also used : ClaimMetadataManagementServiceClaimMetadataException(org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException) ClaimDialectDTO(org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ClaimDialectDTO) RemoteException(java.rmi.RemoteException)

Example 5 with ClaimMetadataManagementServiceClaimMetadataException

use of org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException in project product-is by wso2.

the class ClaimMappingsOnSecondaryUserStoreTestCase method addLocalClaims.

private void addLocalClaims() throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException {
    LocalClaimDTO localClaimDTO = new LocalClaimDTO();
    localClaimDTO.setLocalClaimURI(CLAIM_URI);
    AttributeMappingDTO[] attributeMappingDTO = new AttributeMappingDTO[2];
    AttributeMappingDTO attributeMappingDTO1 = new AttributeMappingDTO();
    attributeMappingDTO1.setAttributeName(PRIMARY_DOMAIN_MAPPED_ATTRIBUTE);
    attributeMappingDTO1.setUserStoreDomain(UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME);
    attributeMappingDTO[0] = attributeMappingDTO1;
    AttributeMappingDTO attributeMappingDTO2 = new AttributeMappingDTO();
    attributeMappingDTO2.setAttributeName(SECONDARY_DOMAIN_MAPPED_ATTRIBUTE);
    attributeMappingDTO2.setUserStoreDomain(DOMAIN_ID);
    attributeMappingDTO[1] = attributeMappingDTO2;
    localClaimDTO.setAttributeMappings(attributeMappingDTO);
    claimMetadataManagementServiceClient.addLocalClaim(localClaimDTO);
}
Also used : AttributeMappingDTO(org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.AttributeMappingDTO) LocalClaimDTO(org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.LocalClaimDTO)

Aggregations

RemoteException (java.rmi.RemoteException)3 ClaimMetadataManagementServiceClaimMetadataException (org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceClaimMetadataException)3 ClaimDialectDTO (org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ClaimDialectDTO)3 AttributeMappingDTO (org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.AttributeMappingDTO)1 ExternalClaimDTO (org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ExternalClaimDTO)1 LocalClaimDTO (org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.LocalClaimDTO)1 ClaimMetadataManagementServiceClient (org.wso2.identity.integration.common.clients.claim.metadata.mgt.ClaimMetadataManagementServiceClient)1