Diffusion Apple API  6.3.3
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Functions Variables Properties Pages
Instance Methods | List of all members
PTDiffusionSecurityFeature Class Reference

Introduction

This feature provides a client session with the ability to change its associated principal as well as to query permissions assigned to it.

The Security feature for a session can be obtained from the session's security property.

See Also
PTDiffusionSession
Since
5.6
Inheritance diagram for PTDiffusionSecurityFeature:
PTDiffusionFeature

Instance Methods

(void) - changePrincipal:credentials:completionHandler:
 
(void) - getGlobalPermissionsWithCompletionHandler:
 
(void) - getTopicPermissionsForPath:completionHandler:
 
- Instance Methods inherited from PTDiffusionFeature
(instancetype) - NS_UNAVAILABLE
 

Additional Inherited Members

- Class Methods inherited from PTDiffusionFeature
(instancetype) + NS_UNAVAILABLE
 
- Properties inherited from PTDiffusionFeature
PTDiffusionSessionsession
 

Method Documentation

- (void) changePrincipal: (nullable NSString *)  principal
credentials: (nullable PTDiffusionCredentials *)  credentials
completionHandler: (NSError *_Nullable error)  completionHandler 

Change the security principal associated with the current session.

If authentication fails, the current principal will remain valid.

Parameters
principalThe new principal name.
credentialsThe credentials authenticating the new principal.
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Exceptions
NSInvalidArgumentExceptionRaised if the completionHandler argument is nil.
Since
5.6
- (void) getGlobalPermissionsWithCompletionHandler: (NSSet< PTDiffusionGlobalPermission * > *_Nullable)  permissions
(NSError *_Nullable error)  completionHandler 

Query the global permissions assigned to the calling session.

Parameters
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Since
6.3
- (void) getTopicPermissionsForPath: (NSString *)  path
completionHandler: (NSSet< PTDiffusionTopicPermission * > *_Nullable)  permissions
(NSError *_Nullable error)  completionHandler 

Query the topic permissions assigned to the calling session on a given path.

Parameters
paththe path to query for permissions
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Since
6.3