English | 简体中文
SAST Link is a comprehensive personnel management system and OAuth designed to provide a secure and efficient way to manage and authorize access to your applications and services.
This project is the cross-platform SDK for SAST Link which written in C++. If you're interested in the frontend, please visit SAST Link frontend.
Warning
The project is still under development and may not be stable. Please use it with caution.
- C++20 coroutine support
- Cross platform
Compiler & Build Tools
- A compiler that supports C++20 or later
- CMake 3.15 or later
Dependencies
Clone the repository:
git clone https://github.com/NJUPT-SAST/sast-evento-desktop.git
Build the project:
cmake -B build
cmake --build build
Note
if you want to build the example, you can use the following command:
cmake -B build -DBUILD_EXAMPLE=ON
cmake --build build
CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(example VERSION 0.1.0 LANGUAGES CXX)
add_subdirectory(sast-link-cxx-sdk)
add_executable(example main.cc)
target_link_libraries(example PRIVATE
sast-link
)
main.cc
#include <Controller/LoginController.h>
#include <boost/asio/co_spawn.hpp>
#include <boost/asio/detached.hpp>
namespace beast = boost::beast;
namespace net = boost::asio;
int main() {
net::io_context ioc;
LoginController controller(ioc);
net::co_spawn(ioc, controller.begin_login_via_sast_link(), net::detached);
ioc.run();
}
- async get code from sast link
- add more reliable error handling
- add unit tests
- add more api support