Navigation
API > API/Plugins > API/Plugins/JWT
References
| Module | JWT |
| Header | /Engine/Plugins/Experimental/JWT/Source/JWT/Public/JsonWebToken.h |
| Include | #include "JsonWebToken.h" |
Syntax
class FJsonWebToken
Constructors
No constructors are accessible with public or protected access.
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | FromString
(
const FStringView InEncodedJsonWebToken, |
||
| TOptional< FJsonWebToken > | FromString
(
const FStringView InEncodedJsonWebToken |
Creates a JWT from the provided string. | |
| bool | GetAlgorithm
(
FString& OutValue |
Gets the algorithm that was used to construct the signature. | |
| bool | GetAudience
(
FString& OutValue |
Gets the audience. | |
| bool | GetClaim
(
const FStringView InName, |
Gets a claim by name. | |
| TSharedPtr< FJsonValue > | GetClaim
(
const FStringView InName |
Gets a claim by name. | |
| bool | GetExpiration
(
int64& OutValue |
Gets the expiration timestamp. | |
| bool | GetIssuedAt
(
int64& OutValue |
Gets the issued at timestamp. | |
| bool | Gets the issuer domain. | ||
| bool | Gets the key id. | ||
| bool | GetNotBefore
(
int64& OutValue |
Gets the not valid before timestamp. | |
| const TSharedRef< FJsonObject > & | GetPayload () |
Get raw JSON object for payload, allowing for custom claim parsing with FJsonSerializable classes. | |
| bool | GetStringClaim
(
const FString& InName, |
Get a custom claim by name. | |
| bool | GetSubject
(
FString& OutValue |
Gets the subject. | |
| bool | Gets the type. | ||
| bool | HasExpired () |
Checks whether the tokens expiration timestamp is in the past. | |
| bool | Verify () |
Deprecated method to signature validate the JWT. | |
| bool | Verify
(
const IJwtAlgorithm& Algorithm, |
Signature validate and verify the JWT. |
Constants
| Name | Description |
|---|---|
| CLAIM_AUDIENCE | |
| CLAIM_EXPIRATION | |
| CLAIM_ISSUED_AT | |
| CLAIM_ISSUER | JWT payload registered claim field names. |
| CLAIM_NOT_BEFORE | |
| CLAIM_SUBJECT | |
| HEADER_ALGORITHM | |
| HEADER_KEY_ID | |
| HEADER_TYPE | JWT header field names. |
| TYPE_VALUE_JWT | JWT header expected values. |