class AuthorisationServiceInternalEncrypted implements AuthorisationServiceEncrypted {

    @Transactional
    @Override
    public CmsResponse<ScaStatus> getAuthorisationScaStatus(String authorisationId, AuthorisationParentHolder parentHolder) {
        String encryptedId = parentHolder.getParentId();
        Optional<String> decryptedIdOptional = securityDataService.decryptId(encryptedId);

        if (decryptedIdOptional.isEmpty()) {
            log.info("Encrypted Parent ID: [{}]. Get SCA status has failed, couldn't decrypt parent id",
                     encryptedId);
            return CmsResponse.<ScaStatus>builder()
                       .error(TECHNICAL_ERROR)
                       .build();
        }

        return authorisationService.getAuthorisationScaStatus(authorisationId, new AuthorisationParentHolder(parentHolder.getAuthorisationType(), decryptedIdOptional.get()));
    }

}