Meeting SDK for iOS API Reference
Loading...
Searching...
No Matches
MobileRTCAuthService Class Reference

The method provides support for authorizing MobileRTC. More...

#include <MobileRTCAuthService.h>

Inherits NSObject.

Instance Methods

(void) - sdkAuth
 Authenticate SDK.
(BOOL) - isLoggedIn
 Queries whether mobileRTC is logged-in or not.
(MobileRTCUserType- getUserType
 Gets the user type.
(BOOL) - logoutRTC
 Logs out MobileRTC.
(nullable MobileRTCAccountInfo *) - getAccountInfo
 Gets the profile information of the logged-in user.
(void) - enableAutoRegisterNotificationServiceForLogin:
 Enables or disables auto register notification service. This is disabled by default.
(MobileRTCSDKError- registerNotificationService:
 Registers the notification service.
(MobileRTCSDKError- unregisterNotificationService
 Unregisters the notification service.
(MobileRTCNotificationServiceHelper *_Nullable) - getNotificationServiceHelper
 Gets the notification service controller interface.

Properties

id< MobileRTCAuthDelegate > _Nullable delegate
 The property to receive authentication/login events.
NSString * jwtToken
 Jwt auth token.
NSString * publicAppKey
 Public app key used for SDK authentication. Alternative to JWT token.

Detailed Description

The method provides support for authorizing MobileRTC.

Warning
Users should authorize MobileRTC before using it to avoid invalid functions in MobileRTC.

Definition at line 20 of file MobileRTCAuthService.h.

Method Documentation

◆ enableAutoRegisterNotificationServiceForLogin:

- (void) enableAutoRegisterNotificationServiceForLogin: (BOOL) enable

Enables or disables auto register notification service. This is disabled by default.

Parameters
enableYES to enable, NO to disable.

◆ getAccountInfo

- (nullable MobileRTCAccountInfo *) getAccountInfo

Gets the profile information of the logged-in user.

Returns
The profile information of the logged-in user.
Warning
You can only get the instance successfully of logged-in user.

References getAccountInfo.

Referenced by getAccountInfo.

◆ getNotificationServiceHelper

- (MobileRTCNotificationServiceHelper *_Nullable) getNotificationServiceHelper

Gets the notification service controller interface.

Returns
If the function succeeds, it returns a MobileRTCNotificationServiceHelper object. Otherwise, this function fails and returns nil.

References getNotificationServiceHelper.

Referenced by getNotificationServiceHelper.

◆ getUserType

- (MobileRTCUserType) getUserType

Gets the user type.

Returns
One of the user types listed in MobileRTCUserType.
Warning
The method is optional. The default user type is MobileRTCUserType_APIUser. User who logs in MobileRTC with working email is MobileRTCUserType_ZoomUser; User who logs in MobileRTC with SSO is MobileRTCUserType_SSOUser.

References getUserType.

Referenced by getUserType.

◆ isLoggedIn

- (BOOL) isLoggedIn

Queries whether mobileRTC is logged-in or not.

Returns
YES indicates logged-in. Otherwise not.
Warning
The method is optional, ignore it if you do not log in with working email or SSO.

References isLoggedIn.

Referenced by isLoggedIn.

◆ logoutRTC

- (BOOL) logoutRTC

Logs out MobileRTC.

/**

Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
The method is optional, ignore it if you do not login MobileRTC.

References logoutRTC.

Referenced by logoutRTC.

◆ registerNotificationService:

- (MobileRTCSDKError) registerNotificationService: (nullable NSString *) accessToken

Registers the notification service.

Parameters
accessTokenInitialize parameter of notification service.
Returns
If the function succeeds, it returns MobileRTCSDKError_Success. Otherwise, this function returns an error.

◆ sdkAuth

- (void) sdkAuth

Authenticate SDK.

Warning
If you want to auth with jwt token, please fill the jwtToken property. For public app type, fill the publicAppKey property instead. If both jwtToken and publicAppKey are provided, jwtToken will be used preferentially.
If both jwtToken and publicAppKey are nil or empty, user will get error:MobileRTCAuthError_KeyOrSecretEmpty via onMobileRTCAuthReturn defined in MobileRTCAuthDelegate.

References sdkAuth.

Referenced by sdkAuth.

◆ unregisterNotificationService

- (MobileRTCSDKError) unregisterNotificationService

Unregisters the notification service.

Returns
If the function succeeds, it returns MobileRTCSDKError_Success. Otherwise, this function returns an error.

References unregisterNotificationService.

Referenced by unregisterNotificationService.

Property Documentation

◆ delegate

- (id<MobileRTCAuthDelegate> _Nullable) delegate
readwritenonatomicweak

The property to receive authentication/login events.

Definition at line 24 of file MobileRTCAuthService.h.

◆ jwtToken

- (NSString*) jwtToken
readwritenonatomicretain

Jwt auth token.

Warning
Keep the value as a secret. DO NOT publish it. If jwtToken is nil or empty,We will user your appKey and appSecret to Auth, We recommend using JWT Token, and generate JWT Token on your web backend.

Definition at line 30 of file MobileRTCAuthService.h.

◆ publicAppKey

- (NSString*) publicAppKey
readwritenonatomicretain

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

Definition at line 35 of file MobileRTCAuthService.h.