KNYIdentityService Class Reference
| Inherits from | NSObject |
| Declared in | KNYIdentityService.h |
Tasks
-
– init -
identityNameproperty -
identityTypeproperty -
backendTokenproperty -
userProfileproperty -
– initWithIdentityName: -
– loginInBackgroundWithUsername:password:completion: -
– loginInBackgroundWithCustomParams:completion: -
– logoutInBackgroundUsingCompletionBlock: -
– loginWithParentView:completion: -
– isLoggedIn -
– setIdentityServiceEndPoint:identityName: -
– userDataInBackgroundUsingCompletionBlock: -
– userAttributesInBackgroundUsingCompletionBlock: -
– securityAttributesInBackgroundUsingCompletionBlock:
Properties
backendToken
Get the stored backend token.
@property (nonatomic, readonly) NSDictionary *backendTokenReturn Value
returns the backend token.
Discussion
Get the stored backend token.
Declared In
KNYIdentityService.hidentityName
Identity name used by KNYIdentityService instance.
@property (nonatomic, readonly) NSString *identityNameDiscussion
Identity name used by KNYIdentityService instance.
Declared In
KNYIdentityService.hInstance Methods
initWithIdentityName:
Init method Thows exception for invalid identity name.
- (instancetype)initWithIdentityName:(NSString *)identityNameParameters
- identityName
identity name
Return Value
returns an instance of KNYIdentityService with the given identityName
Discussion
Init method Thows exception for invalid identity name.
Declared In
KNYIdentityService.hisLoggedIn
Is logged in with the current identityName.
- (BOOL)isLoggedInReturn Value
YES if a user is logged in with current identityName, otherwise NO.
Discussion
Is logged in with the current identityName.
Declared In
KNYIdentityService.hloginInBackgroundWithCustomParams:completion:
Login with the given credentials asynchronously and executes the given callback block. This asynchronous operation can be canceled by sending -cancel message to the returned object.
- (NSOperation *)loginInBackgroundWithCustomParams:(NSDictionary *)customParams completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- customParams
custom parameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Login with the given credentials asynchronously and executes the given callback block. This asynchronous operation can be canceled by sending -cancel message to the returned object.
Declared In
KNYIdentityService.hloginInBackgroundWithUsername:password:completion:
Login with the given credentials asynchronously and executes the given callback block. This asynchronous operation can be canceled by sending -cancel message to the returned object.
- (NSOperation *)loginInBackgroundWithUsername:(NSString *)username password:(NSString *)password completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- username
username
- password
password
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Login with the given credentials asynchronously and executes the given callback block. This asynchronous operation can be canceled by sending -cancel message to the returned object.
Declared In
KNYIdentityService.hloginWithParentView:completion:
OAuth2/SAML login
- (void)loginWithParentView:(UIView *)parentView completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- parentView
The View to which the UIWebView for login will be added as subview.
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Discussion
OAuth2/SAML login
Declared In
KNYIdentityService.hlogoutInBackgroundUsingCompletionBlock:
Logout asynchronously and executes the given callback block.
- (NSOperation *)logoutInBackgroundUsingCompletionBlock:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Logout asynchronously and executes the given callback block.
Declared In
KNYIdentityService.hsecurityAttributesInBackgroundUsingCompletionBlock:
security attribures returned by a provider
- (NSOperation *)securityAttributesInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completionParameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Discussion
security attribures returned by a provider
Declared In
KNYIdentityService.hsetIdentityServiceEndPoint:identityName:
set the endpoint url for given identity name
- (void)setIdentityServiceEndPoint:(NSString *)URLString identityName:(NSString *)identityNameParameters
- URLString
new endpoint url for given provider name
- Idenityname
providername
Discussion
set the endpoint url for given identity name
Declared In
KNYIdentityService.huserAttributesInBackgroundUsingCompletionBlock:
user attribures returned by a provider
- (NSOperation *)userAttributesInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completionParameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Discussion
user attribures returned by a provider
Declared In
KNYIdentityService.huserDataInBackgroundUsingCompletionBlock:
generic session data
- (NSOperation *)userDataInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completionParameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Discussion
generic session data
Declared In
KNYIdentityService.h