java.lang.Object | |
↳ | com.kinvey.java.auth.KinveyAuthRequest.Builder |
Used to construct a KinveyAuthRequest
. The result will be an auth request that adjusts for the
authentication scenario.
There are three scenarios that this builder will support for Kinvey authentication.
The first is where the user is known and the both the username and password have been provided.
KinveyAuthResponse response = new KinveyAuthRequest.Builder(transport,jsonfactory,baseUrl, appKey,appSecret) .setUserIdAndPassword(userid, password) .build() .execute();
The second is where the user has established their identity with one of the supported 3rd party authentication systems like Facebook, LinkedInCredential, etc.
KinveyAuthResponse response = new KinveyAuthRequest.Builder(transport,jsonfactory,baseUrl, appKey,appSecret) .setThirdPartyAuthToken(thirdpartytoken) .build() .execute();
The third and final way authentication can occur is with just the appKey and appSecret, in this case, an
implicit user is created when the execute()
is called.
KinveyAuthResponse response = new KinveyAuthRequest.Builder(transport,jsonfactory,baseUrl, appKey,appSecret) .build() .execute();
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KinveyAuthRequest.Builder(HttpTransport transport, JsonFactory jsonFactory, String baseUrl, String appKey, String appSecret, GenericJson user) | |||||||||||
KinveyAuthRequest.Builder(HttpTransport transport, JsonFactory jsonFactory, String baseUrl, String appKey, String appSecret, String username, String password, GenericJson user) | |||||||||||
KinveyAuthRequest.Builder(HttpTransport transport, JsonFactory jsonFactory, String baseUrl, String appKey, String appSecret, ThirdPartyIdentity identity, GenericJson user) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KinveyAuthRequest | build() | ||||||||||
BasicAuthentication | getAppKeyAuthentication() | ||||||||||
String | getBaseUrl() | ||||||||||
JsonFactory | getJsonFactory() | ||||||||||
final String | getPassword() | ||||||||||
ThirdPartyIdentity | getThirdPartyIdentity() | ||||||||||
HttpTransport | getTransport() | ||||||||||
final String | getUsername() | ||||||||||
KinveyAuthRequest.Builder | setCreate(boolean create) | ||||||||||
void | setPassword(String password) | ||||||||||
KinveyAuthRequest.Builder | setThirdPartyIdentity(ThirdPartyIdentity identity) | ||||||||||
KinveyAuthRequest.Builder | setUser(GenericJson user) | ||||||||||
void | setUsername(String username) | ||||||||||
KinveyAuthRequest.Builder | setUsernameAndPassword(String username, String password) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
null
if none is set
null
in none is set
password | user provided password for the authentication request |
---|
username | uniquely identifies the user |
---|