public class

User

extends GenericJson
java.lang.Object
   ↳ java.util.AbstractMap<K, V>
     ↳ com.google.api.client.util.GenericData
       ↳ com.google.api.client.json.GenericJson
         ↳ com.kinvey.java.User

Class Overview

This class is not thread-safe.

Summary

Nested Classes
class User.Delete Delete Request Class, extends AbstractKinveyJsonClientRequest
class User.EmailVerification EmailVerification Request Class, extends AbstractKinveyJsonClientRequest
class User.LoginRequest Login Request Class. 
class User.LogoutRequest Logout Request Class. 
class User.ResetPassword ResetPassword Request Class, extends AbstractKinveyJsonClientRequest
class User.Retrieve<T> Retrieve Request Class, extends AbstractKinveyJsonClientRequest
class User.Update Update Request Class, extends AbstractKinveyJsonClientRequest
Constants
String USER_COLLECTION_NAME
Public Constructors
User()
Public Methods
User.LoginRequest create(String userid, String password)
This method is deprecated. Renamed to createBlocking(String, String)
User.LoginRequest createBlocking(String userid, String password)
Creates an explicit Kinvey User.
User.Delete delete(boolean hardDelete)
This method is deprecated. Renamed to deleteBlocking(boolean)
User.Delete deleteBlocking(boolean hardDelete)
Delete's the given user from the server.
String getAuthToken()
String getId()
String getUsername()
boolean isUserLoggedIn()
Method to determine if the current user instnace represents a logged-in user
User.LoginRequest login()
This method is deprecated. Renamed to loginBlocking()
User.LoginRequest login(Credential credential)
Log in with existing credential
User.LoginRequest login(String username, String password)
This method is deprecated. Renamed to loginBlocking()
User.LoginRequest loginAuthLinkBlocking(String accessToken, String refreshToken)
User.LoginRequest loginBlocking()
Login with the implicit user.
User.LoginRequest loginBlocking(String username, String password)
Login with Kinvey user and password.
User.LoginRequest loginFacebook(String accessToken)
This method is deprecated. Renamed to loginFacebookBlocking(String)
User.LoginRequest loginFacebookBlocking(String accessToken)
Login to Kinvey services using Facebook access token obtained through OAuth2.
User.LoginRequest loginGoogle(String accessToken)
This method is deprecated. Renamed to loginGoogleBlocking(String)
User.LoginRequest loginGoogleBlocking(String accessToken)
Login to Kinvey services using Google access token obtained through OAuth2.
User.LoginRequest loginLinkedIn(String accessToken, String accessSecret, String consumerKey, String consumerSecret)
This method is deprecated. Renamed to loginLinkedInBlocking(String, String, String, String)
User.LoginRequest loginLinkedInBlocking(String accessToken, String accessSecret, String consumerKey, String consumerSecret)
Login to Kinvey services using LinkedIn-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a.
User.LoginRequest loginSalesForceBlocking(String accessToken, String Clientid, String refreshToken, String id)
Login to Kinvey services using SalesForce access token obtained through OAuth2.
User.LoginRequest loginTwitter(String accessToken, String accessSecret, String consumerKey, String consumerSecret)
This method is deprecated. Renamed to loginTwitterBlocking(String, String, String, String)
User.LoginRequest loginTwitterBlocking(String accessToken, String accessSecret, String consumerKey, String consumerSecret)
Login to Kinvey services using Twitter-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a.
User.LogoutRequest logout()
Logs the user out of the current app
User.ResetPassword resetPassword()
This method is deprecated. Renamed to resetPasswordBlocking(String)
User.ResetPassword resetPasswordBlocking(String username)
Initiates a password reset request for a provided username
Retrieve<User> retrieve()
This method is deprecated. Renamed to retrieveBlocking()
Retrieve<User[]> retrieve(Query query)
This method is deprecated. Renamed to retrieveBlocking(Query)
Retrieve<User> retrieveBlocking()
Retrieves current user profile metadata.
Retrieve<User[]> retrieveBlocking(Query query)
Retrieves an array of User[] based on a Query.
User.EmailVerification sendEmailVerification()
This method is deprecated. Renamed to sendEmailVerificationBlocking()
User.EmailVerification sendEmailVerificationBlocking()
Initiates an EmailVerification request for the current user
void setAuthToken(String authToken)
void setId(String id)
void setUsername(String username)
User.Update update()
This method is deprecated. Renamed to updateBlocking()
User.Update updateBlocking()
Updates the current user's profile
[Expand]
Inherited Methods
From class com.google.api.client.json.GenericJson
From class com.google.api.client.util.GenericData
From class java.util.AbstractMap
From class java.lang.Object
From interface java.util.Map

Constants

public static final String USER_COLLECTION_NAME

Constant Value: "user"

Public Constructors

public User ()

Public Methods

public User.LoginRequest create (String userid, String password)

This method is deprecated.
Renamed to createBlocking(String, String)

Creates an explicit Kinvey User.

Parameters
userid userID of Kinvey user
password password of Kinvey user
Returns
  • LoginRequest Object
Throws
IOException
IOException

public User.LoginRequest createBlocking (String userid, String password)

Creates an explicit Kinvey User.

Parameters
userid userID of Kinvey user
password password of Kinvey user
Returns
  • LoginRequest Object
Throws
IOException

public User.Delete delete (boolean hardDelete)

This method is deprecated.
Renamed to deleteBlocking(boolean)

Delete's the given user from the server.

Parameters
hardDelete if true, physically deletes the user. If false, marks user as inactive.
Returns
  • Delete Request
Throws
IOException
IOException

public User.Delete deleteBlocking (boolean hardDelete)

Delete's the given user from the server.

Parameters
hardDelete if true, physically deletes the user. If false, marks user as inactive.
Returns
  • Delete Request
Throws
IOException

public String getAuthToken ()

public String getId ()

public String getUsername ()

public boolean isUserLoggedIn ()

Method to determine if the current user instnace represents a logged-in user

Returns
  • true if user is logged in, false if not

public User.LoginRequest login ()

This method is deprecated.
Renamed to loginBlocking()

Login with the implicit user. If implicit user does not exist, the user is created. After calling this method, the application should retrieve and store the userID using getId()

Returns
  • LoginRequest object
Throws
IOException
IOException

public User.LoginRequest login (Credential credential)

Log in with existing credential

Returns
  • LoginRequest object
Throws
IOException

public User.LoginRequest login (String username, String password)

This method is deprecated.
Renamed to loginBlocking()

Login with Kinvey user and password. If user does not exist, returns a error response.

Parameters
username userID of Kinvey User
password password of Kinvey user
Returns
  • LoginRequest object
Throws
IOException
IOException

public User.LoginRequest loginAuthLinkBlocking (String accessToken, String refreshToken)

Throws
IOException

public User.LoginRequest loginBlocking ()

Login with the implicit user. If implicit user does not exist, the user is created. After calling this method, the application should retrieve and store the userID using getId()

Returns
  • LoginRequest object
Throws
IOException

public User.LoginRequest loginBlocking (String username, String password)

Login with Kinvey user and password. If user does not exist, returns a error response.

Parameters
username userID of Kinvey User
password password of Kinvey user
Returns
  • LoginRequest object
Throws
IOException

public User.LoginRequest loginFacebook (String accessToken)

This method is deprecated.
Renamed to loginFacebookBlocking(String)

Login to Kinvey services using Facebook access token obtained through OAuth2. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Facebook-generated access token.
Returns
  • LoginRequest Object
Throws
IOException
IOException

public User.LoginRequest loginFacebookBlocking (String accessToken)

Login to Kinvey services using Facebook access token obtained through OAuth2. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Facebook-generated access token.
Returns
  • LoginRequest Object
Throws
IOException

public User.LoginRequest loginGoogle (String accessToken)

This method is deprecated.
Renamed to loginGoogleBlocking(String)

Login to Kinvey services using Google access token obtained through OAuth2. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Google-generated access token
Returns
  • LoginRequest Object
Throws
IOException
IOException

public User.LoginRequest loginGoogleBlocking (String accessToken)

Login to Kinvey services using Google access token obtained through OAuth2. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Google-generated access token
Returns
  • LoginRequest Object
Throws
IOException

public User.LoginRequest loginLinkedIn (String accessToken, String accessSecret, String consumerKey, String consumerSecret)

This method is deprecated.
Renamed to loginLinkedInBlocking(String, String, String, String)

Login to Kinvey services using LinkedIn-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Linked In generated access token
accessSecret Linked In generated access secret
consumerKey Linked In generated consumer key
consumerSecret Linked In generated consumer secret
Returns
  • LoginRequest Object
Throws
IOException
IOException

public User.LoginRequest loginLinkedInBlocking (String accessToken, String accessSecret, String consumerKey, String consumerSecret)

Login to Kinvey services using LinkedIn-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Linked In generated access token
accessSecret Linked In generated access secret
consumerKey Linked In generated consumer key
consumerSecret Linked In generated consumer secret
Returns
  • LoginRequest Object
Throws
IOException

public User.LoginRequest loginSalesForceBlocking (String accessToken, String Clientid, String refreshToken, String id)

Login to Kinvey services using SalesForce access token obtained through OAuth2. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken SalesForce-generated access token
Returns
  • LoginRequest Object
Throws
IOException

public User.LoginRequest loginTwitter (String accessToken, String accessSecret, String consumerKey, String consumerSecret)

This method is deprecated.
Renamed to loginTwitterBlocking(String, String, String, String)

Login to Kinvey services using Twitter-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Twitter-generated access token
accessSecret Twitter-generated access secret
consumerKey Twitter-generated consumer key
consumerSecret Twitter-generated consumer secret
Returns
  • LoginRequest Object
Throws
IOException
IOException

public User.LoginRequest loginTwitterBlocking (String accessToken, String accessSecret, String consumerKey, String consumerSecret)

Login to Kinvey services using Twitter-generated access token, access secret, consumer key, and consumer secret obtained through OAuth1a. If the user does not exist in the Kinvey service, the user will be created.

Parameters
accessToken Twitter-generated access token
accessSecret Twitter-generated access secret
consumerKey Twitter-generated consumer key
consumerSecret Twitter-generated consumer secret
Returns
  • LoginRequest Object
Throws
IOException

public User.LogoutRequest logout ()

Logs the user out of the current app

Returns
  • LogoutRequest object
Throws
IOException

public User.ResetPassword resetPassword ()

This method is deprecated.
Renamed to resetPasswordBlocking(String)

Initiates a password reset request for the current user

Returns
  • ResetPassword request
Throws
IOException
IOException

public User.ResetPassword resetPasswordBlocking (String username)

Initiates a password reset request for a provided username

Parameters
username the username to request a password reset for
Returns
  • ResetPassword request
Throws
IOException

public Retrieve<User> retrieve ()

This method is deprecated.
Renamed to retrieveBlocking()

Retrieves current user profile metadata.

Returns
  • Retrieve Request
Throws
IOException
IOException

public Retrieve<User[]> retrieve (Query query)

This method is deprecated.
Renamed to retrieveBlocking(Query)

Retrieves an array of User[] based on a Query.

Returns
  • Retrieve Request
Throws
IOException
IOException

public Retrieve<User> retrieveBlocking ()

Retrieves current user profile metadata.

Returns
  • Retrieve Request
Throws
IOException

public Retrieve<User[]> retrieveBlocking (Query query)

Retrieves an array of User[] based on a Query.

Returns
  • Retrieve Request
Throws
IOException

public User.EmailVerification sendEmailVerification ()

This method is deprecated.
Renamed to sendEmailVerificationBlocking()

Initiates an EmailVerification request for the current user

Returns
  • EMail Verification Request
Throws
IOException
IOException

public User.EmailVerification sendEmailVerificationBlocking ()

Initiates an EmailVerification request for the current user

Returns
  • EMail Verification Request
Throws
IOException

public void setAuthToken (String authToken)

public void setId (String id)

public void setUsername (String username)

public User.Update update ()

This method is deprecated.
Renamed to updateBlocking()

Updates the current user's profile

Returns
  • Update request
Throws
IOException
IOException

public User.Update updateBlocking ()

Updates the current user's profile

Returns
  • Update request
Throws
IOException