appAuthorization property
Returns the configured application authorization API token.
Returns an empty string when no valid token is set.
Returns
- String: the API token or empty string.
Also see:
- verifyAppAuthorization - Validate an authorization token.
Implementation
static String get appAuthorization {
final OperationResult resultString = staticMethod(
'SdkSettings',
'getAppAuthorization',
logPrivacyLevel: LogPrivacyLevel.hideArgumentValues,
);
return resultString['result'];
}
Sets the application authorization API token used by the SDK.
The SDK must be initialized before setting the token; otherwise a GemKitUninitializedException is thrown.
The token is typically passed at the time of SDK initialization via GemKit.initialize but can be updated later.
Parameters
token: API token (JWT or other scheme accepted by the SDK).
Also see:
- verifyAppAuthorization - Validate an authorization token.
Implementation
static set appAuthorization(String token) {
if (isSDkInitialized) {
staticMethod(
'SdkSettings',
'setAppAuthorization',
args: token,
logPrivacyLevel: LogPrivacyLevel.hideArgumentValues,
);
} else {
throw GemKitUninitializedException();
}
}