![]() |
Diffusion Apple API 6.11.8
Unified Client Library for iOS, tvOS and OS X / macOS
|
This feature provides a client session with the ability to change its associated principal as well as to query permissions assigned to it. More...
#include <PTDiffusionSecurityFeature.h>
Instance Methods | |
| (void) | - changePrincipal:credentials:completionHandler: |
| (void) | - getGlobalPermissionsWithCompletionHandler: |
| (void) | - getTopicPermissionsForPath:completionHandler: |
Additional Inherited Members | |
| Properties inherited from PTDiffusionFeature | |
| PTDiffusionSession * | session |
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.
| - (void) changePrincipal: | (nullable NSString *) | principal | |
| credentials: | (nullable PTDiffusionCredentials *) | credentials | |
| completionHandler: | (void(^)(NSError *_Nullable error)) | completionHandler |
Change the security principal associated with the current session.
If authentication fails, the current principal will remain valid.
| principal | The new principal name. |
| credentials | The credentials authenticating the new principal. |
| completionHandler | Block 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. |
| NSInvalidArgumentException | Raised if the completionHandler argument is nil. |
| - (void) getGlobalPermissionsWithCompletionHandler: | (void(^)(NSSet< PTDiffusionGlobalPermission * > *_Nullable permissions, NSError *_Nullable error)) | completionHandler |
Query the global permissions assigned to the calling session.
| completionHandler | Block 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. |
| - (void) getTopicPermissionsForPath: | (NSString *) | path | |
| completionHandler: | (void(^)(NSSet< PTDiffusionPathPermission * > *_Nullable permissions, NSError *_Nullable error)) | completionHandler |
Query the topic permissions assigned to the calling session on a given path.
| path | the path to query for permissions |
| completionHandler | Block 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. |