use of org.wso2.carbon.identity.consent.mgt.services.ConsentUtilityService in project carbon-identity-framework by wso2.
the class IdentityConsentServiceComponent method activate.
@Activate
protected void activate(ComponentContext ctxt) {
try {
ctxt.getBundleContext().registerService(AbstractEventHandler.class.getName(), new ConsentDeletionUserEventHandler(), null);
ctxt.getBundleContext().registerService(ApplicationMgtListener.class.getName(), new ConsentDeletionAppMgtListener(), null);
ctxt.getBundleContext().registerService(TenantMgtListener.class.getName(), new TenantConsentMgtListener(), null);
ctxt.getBundleContext().registerService(ConsentUtilityService.class.getName(), new ConsentUtilityService(), null);
} catch (Throwable throwable) {
log.error("Error while activating Identity Consent Service Component.", throwable);
}
}
use of org.wso2.carbon.identity.consent.mgt.services.ConsentUtilityService in project identity-governance by wso2-extensions.
the class UserSelfRegistrationManager method filterClaimsFromReceipt.
private void filterClaimsFromReceipt(ReceiptInput receiptInput, Map<String, String> claims) throws IdentityRecoveryServerException {
ConsentUtilityService consentUtilityService = IdentityRecoveryServiceDataHolder.getInstance().getConsentUtilityService();
try {
Set<String> filteredKeys = consentUtilityService.filterPIIsFromReceipt(claims.keySet(), receiptInput);
claims.keySet().retainAll(filteredKeys);
} catch (ConsentUtilityServiceException e) {
throw new IdentityRecoveryServerException("Receipt validation failed against purposes", e);
}
}
Aggregations