All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.foodtechlab.lib.auth.service.domain.confirmationCode.usecases.FindCodeBySessionUseCase Maven / Gradle / Ivy

There is a newer version: 4.1.0
Show newest version
package ru.foodtechlab.lib.auth.service.domain.confirmationCode.usecases;

import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.SingleInput;
import com.rcore.domain.commons.usecase.model.SingleOutput;
import lombok.RequiredArgsConstructor;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.entity.ConfirmationCodeEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.port.ConfirmationCodeRepository;

import java.util.Optional;

@RequiredArgsConstructor
public class FindCodeBySessionUseCase extends UseCase, SingleOutput>> {

    private final ConfirmationCodeRepository repository;

    @Override
    public SingleOutput> execute(SingleInput authId) {
        return SingleOutput.of(repository.findCodeBySession(authId.getValue()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy