Navigation
API > API/Plugins > API/Plugins/JWT
| Name | FJsonWebToken |
| Type | class |
| Header File | /Engine/Plugins/Experimental/JWT/Source/JWT/Public/JsonWebToken.h |
| Include Path | #include "JsonWebToken.h" |
Syntax
class FJsonWebToken
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FJsonWebToken
(
const FStringView InEncodedHeaderPayload, |
JsonWebToken.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CLAIM_AUDIENCE | const TCHAR *const | JsonWebToken.h | |
| CLAIM_EXPIRATION | const TCHAR *const | JsonWebToken.h | |
| CLAIM_ISSUED_AT | const TCHAR *const | JsonWebToken.h | |
| CLAIM_ISSUER | const TCHAR *const | JWT payload registered claim field names. | JsonWebToken.h |
| CLAIM_NOT_BEFORE | const TCHAR *const | JsonWebToken.h | |
| CLAIM_SUBJECT | const TCHAR *const | JsonWebToken.h | |
| HEADER_ALGORITHM | const TCHAR *const | JsonWebToken.h | |
| HEADER_KEY_ID | const TCHAR *const | JsonWebToken.h | |
| HEADER_TYPE | const TCHAR *const | JWT header field names. | JsonWebToken.h |
| TYPE_VALUE_JWT | const TCHAR *const | JWT header expected values. | JsonWebToken.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EncodedHeaderPayload | FString | The encoded header and payload parts. | JsonWebToken.h | |
| Header | TSharedRef< FJsonObject > | The decoded and parsed header. | JsonWebToken.h | |
| Payload | TSharedRef< FJsonObject > | The decoded and parsed payload. | JsonWebToken.h | |
| Signature | TOptional< TArray< uint8 > > | The decoded signature. | JsonWebToken.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool GetAlgorithm
(
FString& OutValue |
Gets the algorithm that was used to construct the signature. | JsonWebToken.h | |
bool GetAudience
(
FString& OutValue |
Gets the audience. | JsonWebToken.h | |
bool GetClaim
(
const FStringView InName, |
Gets a claim by name. | JsonWebToken.h | |
TSharedPtr< FJsonValue > GetClaim
(
const FStringView InName |
Gets a claim by name. | JsonWebToken.h | |
bool GetExpiration
(
int64& OutValue |
Gets the expiration timestamp. | JsonWebToken.h | |
bool GetIssuedAt
(
int64& OutValue |
Gets the issued at timestamp. | JsonWebToken.h | |
bool GetIssuer
(
FString& OutValue |
Gets the issuer domain. | JsonWebToken.h | |
bool GetKeyId
(
FString& OutValue |
Gets the key id. | JsonWebToken.h | |
bool GetNotBefore
(
int64& OutValue |
Gets the not valid before timestamp. | JsonWebToken.h | |
const TSharedRef< FJsonObject > & GetPayload() |
Get raw JSON object for payload, allowing for custom claim parsing with FJsonSerializable classes. | JsonWebToken.h | |
bool GetStringClaim
(
const FString& InName, |
Get a custom claim by name. | JsonWebToken.h | |
bool GetSubject
(
FString& OutValue |
Gets the subject. | JsonWebToken.h | |
bool GetType
(
FString& OutValue |
Gets the type. | JsonWebToken.h | |
bool HasExpired() |
Checks whether the tokens expiration timestamp is in the past. | JsonWebToken.h | |
bool Verify () |
Deprecated method to signature validate the JWT. | JsonWebToken.h | |
bool Verify
(
const IJwtAlgorithm& Algorithm, |
Signature validate and verify the JWT. | JsonWebToken.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DumpJsonObject
(
const FJsonObject& InJsonObject |
JsonWebToken.h | ||
static TSharedPtr< FJsonObject > FromJson
(
const FString& InJsonStr |
JsonWebToken.h | ||
static bool FromString
(
const FStringView InEncodedJsonWebToken, |
JsonWebToken.h | ||
static TOptional< FJsonWebToken > FromString
(
const FStringView InEncodedJsonWebToken |
Creates a JWT from the provided string. | JsonWebToken.h | |
static TSharedPtr< FJsonObject > ParseEncodedJson
(
const FStringView InEncodedJson |
JsonWebToken.h |