Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Modules/Account/moduleSrc/Account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "ORM/User.h"
#include "ORM/UserWallets.h"
#include "ORM/WalletTransactions.h"
#include "ORM/Auth.h"
#include "Payment/PaymentLogic.h"
#include "Payment/intfPaymentGateway.h"
//#include "Interfaces/ORM/APIQueryBuilders.h"
Expand Down Expand Up @@ -175,6 +176,7 @@ Account::Account() :
this->addSubModule(&UserWallets::instance());
this->addSubModule(&WalletTransactions::instance());
this->addSubModule(&WalletBalances::instance());
this->addSubModule(&Auth::instance());

if (Account::InvalidPasswordsFile.value().size()) {
QFile InputFile(Account::InvalidPasswordsFile.value());
Expand Down
43 changes: 43 additions & 0 deletions Modules/Account/moduleSrc/ORM/Auth.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/******************************************************************************
# TargomanAPI: REST API for Targoman
#
# Copyright 2014-2020 by Targoman Intelligent Processing <http://tip.co.ir>
#
# TargomanAPI is free software: you can redistribute it and/or modify
# it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# TargomanAPI is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# along with Targoman. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
/**
* @author S. Mehran M. Ziabary <ziabary@targoman.com>
* @author Kambiz Zandi <kambizzandi@gmail.com>
*/

#include "Auth.h"

namespace Targoman::API::AccountModule::ORM {

Auth::Auth() :
intfPureModule(
"Account"
)
{}

bool Auth::apivalidateJWT(
TAPI::JWT_t _JWT
)
{
Q_UNUSED(_JWT);

return true;
}

} //namespace Targoman::API::AccountModule::ORM
55 changes: 55 additions & 0 deletions Modules/Account/moduleSrc/ORM/Auth.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/******************************************************************************
# TargomanAPI: REST API for Targoman
#
# Copyright 2014-2020 by Targoman Intelligent Processing <http://tip.co.ir>
#
# TargomanAPI is free software: you can redistribute it and/or modify
# it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# TargomanAPI is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# along with Targoman. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
/**
* @author S. Mehran M. Ziabary <ziabary@targoman.com>
* @author Kambiz Zandi <kambizzandi@gmail.com>
*/

#ifndef TARGOMAN_API_MODULES_ACCOUNT_ORM_AUTH_H
#define TARGOMAN_API_MODULES_ACCOUNT_ORM_AUTH_H

#include "Interfaces/AAA/AAA.hpp"
#include "Interfaces/API/intfPureModule.h"

namespace Targoman::API::AccountModule {

//structures and enumes goes here

namespace ORM {

class Auth : public intfPureModule
{
Q_OBJECT
TARGOMAN_DEFINE_API_SUBMODULE(Account, Auth)

private slots:
bool REST_GET_OR_POST(
validateJWT,
(
TAPI::JWT_t _JWT
),
"Check JWT"
)

};

} //namespace ORM
} //namespace Targoman::API::AccountModule

#endif // TARGOMAN_API_MODULES_ACCOUNT_ORM_AUTH_H
2 changes: 2 additions & 0 deletions Modules/Account/moduleSrc/moduleSrc.pro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ HEADERS += \
ORM/APITokens.h \
ORM/APITokenValidIPs.h \
ORM/ApprovalRequest.h \
ORM/Auth.h \
ORM/BlockingRules.h \
ORM/ForgotPassRequest.h \
ORM/IPBin.h \
Expand All @@ -40,6 +41,7 @@ SOURCES += \
ORM/APITokens.cpp \
ORM/APITokenValidIPs.cpp \
ORM/ApprovalRequest.cpp \
ORM/Auth.cpp \
ORM/BlockingRules.cpp \
ORM/ForgotPassRequest.cpp \
ORM/IPBin.cpp \
Expand Down