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
 Check whether mobileRTC is logged-in or not.
 
(MobileRTCUserType- getUserType
 Get user type.
 
(BOOL) - logoutRTC
 Specify to logout MobileRTC.
 
(nullable MobileRTCAccountInfo *) - getAccountInfo
 Specify to get the profile information of logged-in user.
 
(void) - enableAutoRegisterNotificationServiceForLogin:
 Enable or disable auto register notification service. This is disabled by default.
 
(MobileRTCSDKError- registerNotificationService:
 Register notification service.
 
(MobileRTCSDKError- unregisterNotificationService
 Unregister notification service.
 
(MobileRTCNotificationServiceHelper *_Nullable) - getNotificationServiceHelper
 Get 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 23 of file MobileRTCAuthService.h.

Method Documentation

◆ enableAutoRegisterNotificationServiceForLogin:

- (void) enableAutoRegisterNotificationServiceForLogin: (BOOL) enable

Enable or disable auto register notification service. This is disabled by default.

Parameters
enableYES means enabled, otherwise not.

◆ getAccountInfo

- (nullable MobileRTCAccountInfo *) getAccountInfo

Specify to get the profile information of logged-in user.

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

◆ getNotificationServiceHelper

- (MobileRTCNotificationServiceHelper *_Nullable) getNotificationServiceHelper

Get notification service controller interface.

Returns
If the function succeeds, it will return a MobileRTCNotificationServiceHelper object.

◆ getUserType

- (MobileRTCUserType) getUserType

Get 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

Check 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

Specify to logout MobileRTC.

/**

Returns
YES indicates to call the method successfully. Otherwise not.
Warning
The method is optional, ignore it if you do not login MobileRTC.

◆ registerNotificationService:

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

Register notification service.

Parameters
accessTokenInitialize parameter of notification service.
Returns
If the function succeeds, it will return MobileRTCSDKError_Success. Otherwise failed.

◆ 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

Unregister notification service.

Returns
If the function succeeds, it will return MobileRTCSDKError_Success. Otherwise failed.

Property Documentation

◆ delegate

- (id<MobileRTCAuthDelegate> _Nullable) delegate
readwritenonatomicweak

The property to receive authentication/login events.

Definition at line 27 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 33 of file MobileRTCAuthService.h.