lintel 0.2.0
Loading...
Searching...
No Matches
AuthCliService.h
Go to the documentation of this file.
1#ifndef LINTEL_AUTHCLISERVICE_H
2#define LINTEL_AUTHCLISERVICE_H
3
4#include <memory>
5#include <optional>
6
12
13namespace lintel {
16{
17private:
18 std::shared_ptr<UserApi> m_userApi;
19 std::shared_ptr<CommandLineUtils> m_commandLineUtils;
20 std::shared_ptr<IInputService> m_inputService;
21 std::shared_ptr<ITerminalService> m_terminalService;
22 std::shared_ptr<AuthArgumentProvider> m_authArgumentProvider;
23
24public:
25 AuthCliService(std::shared_ptr<UserApi> userApi,
26 std::shared_ptr<CommandLineUtils> commandLineUtils,
27 std::shared_ptr<IInputService> inputService,
28 std::shared_ptr<ITerminalService> terminalService,
29 std::shared_ptr<AuthArgumentProvider> argumentProvider);
30
32 std::optional<UserDto> onLogin();
33
36
37private:
39 std::string readUserName();
40
42 std::string readPassword();
43};
44
45}// namespace lintel
46#endif// LINTEL_AUTHCLISERVICE_H
Definition AuthCliService.h:16
AuthCliService(std::shared_ptr< UserApi > userApi, std::shared_ptr< CommandLineUtils > commandLineUtils, std::shared_ptr< IInputService > inputService, std::shared_ptr< ITerminalService > terminalService, std::shared_ptr< AuthArgumentProvider > argumentProvider)
void onLogout(UserDto &&userDto)
std::optional< UserDto > onLogin()
Definition UserDto.h:16
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9