private AddReceiptResponse addReceipt(String subject, String subjectTenantDomain, ServiceProvider serviceProvider, String spTenantDomain, List<ClaimMetaData> claims) throws SSOConsentServiceException { ReceiptInput receiptInput = buildReceiptInput(subject, serviceProvider, spTenantDomain, claims); AddReceiptResponse receiptResponse; try { startTenantFlowWithUser(subject, subjectTenantDomain); receiptResponse = getConsentManager().addConsent(receiptInput); } catch (ConsentManagementException e) { throw new SSOConsentServiceException("Consent receipt error", "Error while adding the consent " + "receipt", e); } finally { PrivilegedCarbonContext.endTenantFlow(); } if (isDebugEnabled()) { logDebug("Successfully added consent receipt: " + receiptResponse.getConsentReceiptId()); } return receiptResponse; }
private AddReceiptResponse addReceipt(String subject, String subjectTenantDomain, ServiceProvider serviceProvider, String spTenantDomain, List<ClaimMetaData> claims) throws SSOConsentServiceException { ReceiptInput receiptInput = buildReceiptInput(subject, serviceProvider, spTenantDomain, claims); AddReceiptResponse receiptResponse; try { startTenantFlowWithUser(subject, subjectTenantDomain); receiptResponse = getConsentManager().addConsent(receiptInput); } catch (ConsentManagementException e) { throw new SSOConsentServiceException("Consent receipt error", "Error while adding the consent " + "receipt", e); } finally { PrivilegedCarbonContext.endTenantFlow(); } if (isDebugEnabled()) { logDebug("Successfully added consent receipt: " + receiptResponse.getConsentReceiptId()); } return receiptResponse; }