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.
 

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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 token property. Otherwise, please fill the client key and client secret property.
If the key or secret of client is blank, user will get error:MobileRTCAuthError_KeyOrSecretEmpty via onMobileRTCAuthReturn defined in MobileRTCAuthDelegate.

◆ unregisterNotificationService

- (MobileRTCSDKError) unregisterNotificationService

Unregisters the notification service.

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

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.