Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sha3sha3/UE-EasyJWT
JWT wrapper (Engine Sub-system) for Unreal Engine.
https://github.com/sha3sha3/UE-EasyJWT
authentication cpp dss-plugin jwt jwt-authentication mmo unreal-engine unreal-engine-4 unreal-engine-5 unrealengine
Last synced: 14 days ago
JSON representation
JWT wrapper (Engine Sub-system) for Unreal Engine.
- Host: GitHub
- URL: https://github.com/sha3sha3/UE-EasyJWT
- Owner: sha3sha3
- License: mit
- Created: 2021-10-10T07:49:00.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T10:05:02.000Z (6 months ago)
- Last Synced: 2024-08-02T16:32:00.393Z (4 months ago)
- Topics: authentication, cpp, dss-plugin, jwt, jwt-authentication, mmo, unreal-engine, unreal-engine-4, unreal-engine-5, unrealengine
- Language: C++
- Homepage: https://www.unrealengine.com/marketplace/en-US/product/easy-jwt
- Size: 525 KB
- Stars: 19
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unreal - UE-EasyJWT - JWT wrapper (Engine Sub-system) for Unreal Engine. (Utilities)
README
# This project is no longer maintained on GitHub, but you may obtain the latest maintained version on [Unreal Marketplace](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt).
Json Web Tokens for Unreal Engine 4/5
# EasyJwt subsystem
EasyJwt is a JSON web tokens engine sub-system for Unreal Engine 4/5, that provides a c++ and bluprint interface to Generate, Sign, Verify and manage claims of JWT.
# Supported Platforms
- Windows x86_64
- Hololens 2 (Windows ARM64)
- Linux x86_64
- Linux ARM64# C++ Modules Link
Link the plugin modules to your project through `.build.cs`:
```cs
bEnableExceptions = true;//we are using exceptionsPrivateDependencyModuleNames.AddRange( new string[]
{
"EasyJwt",
"JwtCpp",
"JwtVerifier",
"JwtGenerator"
});
```
# JWT Generator Basic Usage## C++
Initialize the Generator```cpp
#include "EasyJwtSubsystem.h"TSharedPtr EasyJwt = GEngine->GetEngineSubsystem()->GetEasyJwt();
EasyJwt->GetGenerator()->InitGenerator(``, EGeneratorAlgorithm::HS256);
```Generate Signed Token Basic Example:
```cpp
#include "EasyJwtSubsystem.h"TSharedPtr EasyJwt = GEngine->GetEngineSubsystem()->GetEasyJwt();
TMap Claims =
{
{"Claim1","34235"},
{"Claim2","dfgds"}
};TMap HeaderClaims =
{
{"HeaderClaim1","345343"},
{"HeaderClaim2","jhgfdrtt"}
};
/*
Valid since generating it and for 900sec with the givem claims.
*/
FString JwtToken = EasyJwt->GetGenerator()->GenerateJwtToken(true, 0, 900, Claims, HeaderClaims);
```
## BlueprintInitialize the Generator
Generate Signed Toker
Blueprint API
# JWT Verifier Basic Usage
## C++
Initialize the Verifier```cpp
#include "EasyJwtSubsystem.h"TSharedPtr EasyJwt = GEngine->GetEngineSubsystem()->GetEasyJwt();
EasyJwt->GetVerifier()->InitVerifier(``, EVerifierAlgorithm::HS256);
```Verify a Token
```cpp
#include "EasyJwtSubsystem.h"TSharedPtr EasyJwt = GEngine->GetEngineSubsystem()->GetEasyJwt();
bool bValid = EasyJwt->GetVerifier()->VerifyJWT(``);
```Get Claims From JWT
```cpp
#include "EasyJwtSubsystem.h"TSharedPtr EasyJwt = GEngine->GetEngineSubsystem()->GetEasyJwt();
TMap Claims = EasyJwt->GetVerifier()->GetClaims(``);
```## Blueprint
Initialize the Verifier
Verify a Token
Extract Claims From a JWT
Blueprint API
## Supported Algorithms
- HS256
- HS348
- HS512
- RS256
- RS384
- RS512
- ES256 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)
- ES384 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)
- ES512 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)
- PS256 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)
- PS384 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)
- PS512 [Unreal Marketplace version only](https://www.unrealengine.com/marketplace/en-US/product/easy-jwt)More to come soon!!
## Find it helpful?
Give us a ⭐️!