class AuthorisationServiceInternal implements AuthorisationService {

    @Transactional
    @Override
    public CmsResponse<Boolean> saveAuthenticationMethods(String authorisationId, List<CmsScaMethod> methods) {
        Optional<AuthorisationEntity> authorisationOptional = getAuthorisation(authorisationId);

        if (authorisationOptional.isEmpty()) {
            log.info("Authorisation ID: [{}]. Save authentication methods has failed, because authorisation couldn't be found", authorisationId);
            return CmsResponse.<Boolean>builder()
                       .payload(false)
                       .build();
        }

        AuthorisationEntity authorisation = authorisationOptional.get();

        authorisation.setAvailableScaMethods(scaMethodMapper.mapToScaMethods(methods));
        return CmsResponse.<Boolean>builder()
                   .payload(true)
                   .build();
    }

}