ImagingTools Core SDK
CCredentialControllerComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icomp/CComponentBase.h>
7
8// ImtCore includes
9#include <imtbase/IObjectCollection.h>
10#include <imtauth/ICredentialController.h>
11#include <imtcrypt/IHashGenerator.h>
12
13
14namespace imtauth
15{
16
17
18class CCredentialControllerComp:
19 public icomp::CComponentBase,
20 public imtauth::ICredentialController
21{
22public:
23 typedef icomp::CComponentBase BaseClass;
24
25 I_BEGIN_COMPONENT(CCredentialControllerComp);
26 I_REGISTER_INTERFACE(imtauth::ICredentialController);
27 I_ASSIGN(m_hashCalculatorCompPtr, "HashCalculator", "Hash calculator", true, "HashCalculator");
28 I_ASSIGN(m_userCollectionCompPtr, "UserCollection", "User collection", true, "UserCollection");
29 I_END_COMPONENT;
30
31protected:
32 // reimplemented (iser::ICredentialController)
33 virtual bool CheckCredential(const QByteArray& login, const QByteArray& password) const override;
34
35private:
36 I_REF(imtcrypt::IHashGenerator, m_hashCalculatorCompPtr);
37 I_REF(imtbase::IObjectCollection, m_userCollectionCompPtr);
38};
39
40
41} // namespace imtauth