ru.foodtechlab.lib.auth.service.domain.token.usecases.FindAccessTokensByRefreshTokenUseCase Maven / Gradle / Ivy
package ru.foodtechlab.lib.auth.service.domain.token.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.token.entity.AccessTokenEntity;
import ru.foodtechlab.lib.auth.service.domain.token.port.AccessTokenRepository;
import java.util.List;
@RequiredArgsConstructor
public class FindAccessTokensByRefreshTokenUseCase extends UseCase, SingleOutput>> {
private final AccessTokenRepository accessTokenRepository;
@Override
public SingleOutput> execute(SingleInput input) {
return SingleOutput.of(accessTokenRepository.findByRefreshTokenId(input.getValue()));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy