Meeting SDK for Windows API Reference
Loading...
Searching...
No Matches
tagAuthContext Struct Reference

SDK authentication parameter with JWT token or public app key. More...

#include <auth_service_interface.h>

Public Member Functions

 tagAuthContext ()

Data Fields

const zchar_tjwt_token
 JWT token. You may generate your JWT token using the online tool https://jwt.io/.
const zchar_tpublicAppKey
 Public app key used for SDK authentication. Alternative to JWT token.

Detailed Description

SDK authentication parameter with JWT token or public app key.

Definition at line 148 of file auth_service_interface.h.

Constructor & Destructor Documentation

◆ tagAuthContext()

tagAuthContext::tagAuthContext ( )
inline

Definition at line 180 of file auth_service_interface.h.

181 {
182 jwt_token = nullptr;
183 publicAppKey = nullptr;
184 }
const zchar_t * jwt_token
JWT token. You may generate your JWT token using the online tool https://jwt.io/.
const zchar_t * publicAppKey
Public app key used for SDK authentication. Alternative to JWT token.

References jwt_token, and publicAppKey.

Field Documentation

◆ jwt_token

const zchar_t* tagAuthContext::jwt_token

JWT token. You may generate your JWT token using the online tool https://jwt.io/.

Note
It is highly recommended to generate your JWT token in your backend server. JWT is generated with three core parts: Header, Payload, and Signature. When combined, these parts are separated by a period to form a token: aaaaa.bbbbb.cccc. Please follow this template to compose your payload for SDK initialization: Header { "alg": "HS256", "typ": "JWT" } Payload { "appKey": "string", // Your SDK key "iat": long, // access token issue timestamp "exp": long, // access token expire time "tokenExp": long // token expire time } Signature HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), "Your SDK secret here" )

Definition at line 174 of file auth_service_interface.h.

Referenced by tagAuthContext().

◆ publicAppKey

const zchar_t* tagAuthContext::publicAppKey

Public app key used for SDK authentication. Alternative to JWT token.

Definition at line 179 of file auth_service_interface.h.

Referenced by tagAuthContext().