EVUser Class Reference
| Inherits from | EVObject : NSObject |
| Conforms to | NSCoding |
| Declared in | EVUser.h |
Overview
An Everlive user object that is the local representation of the user persisted to the Everlive cloud.
Tasks
-
+ allUsers:Returns all users from everlive.
-
+ fetchUser:block:Returns the specific user.
-
+ fetchUserWithEmail:block:Returns the user for email.
-
+ fetchWithAccessToken:block:Returns information about the currently logged in user
-
+ setNewPassword:withSecretQuestionId:andSecretAnswer:newPassword:block:Sets a new password for the user with the specified username by using the secret question and secret answer
-
+ setNewPasswordWithResetCode:newPassword:block:Sets a new password for the user with the specified reset code
-
+ resendVerificationEmailWithUserId:block:Resends the verification email for the user with the specified ID
-
+ resendVerificationEmailWithUsername:block:Resends the verification email for the user with the specified username
-
+ currentUserReturn the current logged in user from disk.
-
+ changePassword:oldPassword:newPassword:block:Changes the password of the specified user.
-
+ loginInWithUsername:password:block:Makes an asynchronous request to log in a user with specified credentials.
-
+ loginWithFacebook:block:Makes an asynchronous request to log in a user with facebook access token.
-
+ loginWithLiveId:block:Makes an asynchrounous request to log in a user with live id access token
-
+ loginWithGoogle:block:Makes an asynchrounous request to log in a user with google access token
-
+ linkFacebookAccount:accessToken:block:Links the everlive account with a Facebook account
-
+ linkLiveIdAccount:accessToken:block:Links the everlive account with a LiveID account
-
+ linkGoogleAccount:accessToken:block:Links the everlive account with a Google account
-
+ unlinkFacebookAccount:block:Unlinks the everlive user account and the Facebook account
-
+ unlinkLiveIdAccount:block:Unlinks the everlive user account and the LiveID account
-
+ unlinkGoogleAccount:block:Unlinks the everlive user account and the Google account
-
+ logOutLogs out the currenlty logged in user on disk.
-
– signUp:Signs up the user. Make sure that username and password are set. This will also enforce that the username isn’t already taken.
-
– remove:Removes the user from everlive. Must be authenticated to remove a user.
-
– isAuthenticatedChecks if the current user is logged in.
Class Methods
allUsers:
Returns all users from everlive.
+ (void)allUsers:(EVObjectFetchResultBlock)blockParameters
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hchangePassword:oldPassword:newPassword:block:
Changes the password of the specified user.
+ (void)changePassword:(NSString *)username oldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword block:(EVObjectResultBlock)blockParameters
- username
The username of the user.
- oldPassword
The old password of the user.
- newPassword
The new password of the user.
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hcurrentUser
Return the current logged in user from disk.
+ (EVUser *)currentUserDeclared In
EVUser.hfetchUser:block:
Returns the specific user.
+ (void)fetchUser:(id)userId block:(EVUserResultBlock)blockParameters
- userId
The id against which the user will be retrieved.
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hfetchUserWithEmail:block:
Returns the user for email.
+ (void)fetchUserWithEmail:(NSString *)email block:(EVUserResultBlock)blockParameters
The email to get the user for.
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hfetchWithAccessToken:block:
Returns information about the currently logged in user
+ (void)fetchWithAccessToken:(NSString *)accessToken block:(EVUserResultBlock)blockParameters
- accessToken
The access token that should be passed for authentication of the request.
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hlinkFacebookAccount:accessToken:block:
Links the everlive account with a Facebook account
+ (void)linkFacebookAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)blockParameters
- userId
The Id of the user
- accessToken
The access token from the external provider
- block
The block to execute
Declared In
EVUser.hlinkGoogleAccount:accessToken:block:
Links the everlive account with a Google account
+ (void)linkGoogleAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)blockParameters
- userId
The Id of the user
- accessToken
The access token from the external provider
- block
The block to execute
Declared In
EVUser.hlinkLiveIdAccount:accessToken:block:
Links the everlive account with a LiveID account
+ (void)linkLiveIdAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)blockParameters
- userId
The Id of the user
- accessToken
The access token from the external provider
- block
The block to execute
Declared In
EVUser.hloginInWithUsername:password:block:
Makes an asynchronous request to log in a user with specified credentials.
+ (void)loginInWithUsername:(NSString *)username password:(NSString *)password block:(EVUserResultBlock)blockParameters
- username
The username of the user.
- password
The password of the user.
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hloginWithFacebook:block:
Makes an asynchronous request to log in a user with facebook access token.
+ (void)loginWithFacebook:(NSString *)accessToken block:(EVUserResultBlock)blockParameters
- accessToken
The access token obtained from Facebook.
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hloginWithGoogle:block:
Makes an asynchrounous request to log in a user with google access token
+ (void)loginWithGoogle:(NSString *)accessToken block:(EVUserResultBlock)blockParameters
- accessToken
The access token obtained from LiveId
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hloginWithLiveId:block:
Makes an asynchrounous request to log in a user with live id access token
+ (void)loginWithLiveId:(NSString *)accessToken block:(EVUserResultBlock)blockParameters
- accessToken
The access token obtained from LiveId
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hresendVerificationEmailWithUserId:block:
Resends the verification email for the user with the specified ID
+ (void)resendVerificationEmailWithUserId:(id)userId block:(EVObjectResultBlock)blockParameters
- userId
The id of the user
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hresendVerificationEmailWithUsername:block:
Resends the verification email for the user with the specified username
+ (void)resendVerificationEmailWithUsername:(NSString *)username block:(EVObjectResultBlock)blockParameters
- username
The username for which to send verification email
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hsetNewPassword:withSecretQuestionId:andSecretAnswer:newPassword:block:
Sets a new password for the user with the specified username by using the secret question and secret answer
+ (void)setNewPassword:(NSString *)username withSecretQuestionId:(NSString *)secretQuestionId andSecretAnswer:(NSString *)secretAnswer newPassword:(NSString *)newPassword block:(EVObjectResultBlock)blockParameters
- username
The username identifying the user
- secretQuestionId
The secret question ID of the user
- secretAnswer
The answer to the secret question
- newPassword
The new password to set
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hsetNewPasswordWithResetCode:newPassword:block:
Sets a new password for the user with the specified reset code
+ (void)setNewPasswordWithResetCode:(NSString *)resetCode newPassword:(NSString *)newPassword block:(EVObjectResultBlock)blockParameters
- resetCode
The reset code
- newPassword
The new password to set
- block
The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)
Declared In
EVUser.hunlinkFacebookAccount:block:
Unlinks the everlive user account and the Facebook account
+ (void)unlinkFacebookAccount:(NSString *)userId block:(EVObjectResultBlock)blockParameters
- userId
The user id
- block
The block to execute
Declared In
EVUser.hInstance Methods
isAuthenticated
Checks if the current user is logged in.
- (BOOL)isAuthenticatedDeclared In
EVUser.hremove:
Removes the user from everlive. Must be authenticated to remove a user.
- (void)remove:(EVObjectResultBlock)blockParameters
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.hsignUp:
Signs up the user. Make sure that username and password are set. This will also enforce that the username isn’t already taken.
- (void)signUp:(EVUserResultBlock)blockParameters
- block
The block to execute. The block should have the following argument signature: (EVUser user, NSError error)
Declared In
EVUser.h