KNYIdentityService Class Reference
Inherits from | NSObject |
Declared in | KNYIdentityService.h |
Tasks
-
– init
-
identityName
property -
identityType
property -
backendToken
property -
userProfile
property -
– 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 *backendToken
Return Value
returns the backend token.
Discussion
Get the stored backend token.
Declared In
KNYIdentityService.h
identityName
Identity name used by KNYIdentityService instance.
@property (nonatomic, readonly) NSString *identityName
Discussion
Identity name used by KNYIdentityService instance.
Declared In
KNYIdentityService.h
Instance Methods
initWithIdentityName:
Init method Thows exception for invalid identity name.
- (instancetype)initWithIdentityName:(NSString *)identityName
Parameters
- 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.h
isLoggedIn
Is logged in with the current identityName.
- (BOOL)isLoggedIn
Return Value
YES
if a user is logged in with current identityName, otherwise NO
.
Discussion
Is logged in with the current identityName.
Declared In
KNYIdentityService.h
loginInBackgroundWithCustomParams: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 ))completion
Parameters
- 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.h
loginInBackgroundWithUsername: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 ))completion
Parameters
- 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.h
loginWithParentView:completion:
OAuth2/SAML login
- (void)loginWithParentView:(UIView *)parentView completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completion
Parameters
- 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.h
logoutInBackgroundUsingCompletionBlock:
Logout asynchronously and executes the given callback block.
- (NSOperation *)logoutInBackgroundUsingCompletionBlock:(void ( ^ ) ( BOOL succeeded , NSError *error ))completion
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
Logout asynchronously and executes the given callback block.
Declared In
KNYIdentityService.h
securityAttributesInBackgroundUsingCompletionBlock:
security attribures returned by a provider
- (NSOperation *)securityAttributesInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completion
Parameters
- 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.h
setIdentityServiceEndPoint:identityName:
set the endpoint url for given identity name
- (void)setIdentityServiceEndPoint:(NSString *)URLString identityName:(NSString *)identityName
Parameters
- URLString
new endpoint url for given provider name
- Idenityname
providername
Discussion
set the endpoint url for given identity name
Declared In
KNYIdentityService.h
userAttributesInBackgroundUsingCompletionBlock:
user attribures returned by a provider
- (NSOperation *)userAttributesInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completion
Parameters
- 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.h
userDataInBackgroundUsingCompletionBlock:
generic session data
- (NSOperation *)userDataInBackgroundUsingCompletionBlock:(void ( ^ ) ( NSDictionary *data , NSError *error ))completion
Parameters
- 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