@@ -229,7 +229,7 @@ public Request<UserProfile> tokenInfo(String idToken) {
229229 * @param username of the user and must be non null
230230 * @return a request to start
231231 */
232- public ParameterizableRequest <DatabaseUser > createUser (String email , String password , String username ) {
232+ public DatabaseConnectionRequest <DatabaseUser > createUser (String email , String password , String username ) {
233233 HttpUrl url = HttpUrl .parse (auth0 .getDomainUrl ()).newBuilder ()
234234 .addPathSegment (DB_CONNECTIONS_PATH )
235235 .addPathSegment (SIGN_UP_PATH )
@@ -242,8 +242,9 @@ public ParameterizableRequest<DatabaseUser> createUser(String email, String pass
242242 .setConnection (defaultDbConnection )
243243 .setClientId (getClientId ())
244244 .asDictionary ();
245- return factory .POST (url , client , mapper , DatabaseUser .class )
245+ final ParameterizableRequest < DatabaseUser > request = factory .POST (url , client , mapper , DatabaseUser .class )
246246 .addParameters (parameters );
247+ return new DatabaseConnectionRequest (request );
247248 }
248249
249250 /**
@@ -253,7 +254,7 @@ public ParameterizableRequest<DatabaseUser> createUser(String email, String pass
253254 * @param password of the user and must be non null
254255 * @return a request to start
255256 */
256- public ParameterizableRequest <DatabaseUser > createUser (String email , String password ) {
257+ public DatabaseConnectionRequest <DatabaseUser > createUser (String email , String password ) {
257258 return createUser (email , password , null );
258259 }
259260
@@ -267,7 +268,7 @@ public ParameterizableRequest<DatabaseUser> createUser(String email, String pass
267268 * @return a request to configure and start that will yield {@link Credentials}
268269 */
269270 public SignUpRequest signUp (String email , String password , String username ) {
270- final ParameterizableRequest <DatabaseUser > createUserRequest = createUser (email , password , username );
271+ final DatabaseConnectionRequest <DatabaseUser > createUserRequest = createUser (email , password , username );
271272 final AuthenticationRequest authenticationRequest = login (email , password );
272273 return new SignUpRequest (createUserRequest , authenticationRequest );
273274 }
@@ -281,7 +282,7 @@ public SignUpRequest signUp(String email, String password, String username) {
281282 * @return a request to configure and start that will yield {@link Credentials}
282283 */
283284 public SignUpRequest signUp (String email , String password ) {
284- ParameterizableRequest <DatabaseUser > createUserRequest = createUser (email , password );
285+ DatabaseConnectionRequest <DatabaseUser > createUserRequest = createUser (email , password );
285286 final AuthenticationRequest authenticationRequest = login (email , password );
286287 return new SignUpRequest (createUserRequest , authenticationRequest );
287288 }
@@ -292,7 +293,7 @@ public SignUpRequest signUp(String email, String password) {
292293 * @param email of the user that changes the password. It's also where the email will be sent with the link to perform the change password.
293294 * @return a request to configure and start
294295 */
295- public ChangePasswordRequest requestChangePassword (String email ) {
296+ public ParameterizableRequest < Void > requestChangePassword (String email ) {
296297 HttpUrl url = HttpUrl .parse (auth0 .getDomainUrl ()).newBuilder ()
297298 .addPathSegment (DB_CONNECTIONS_PATH )
298299 .addPathSegment (CHANGE_PASSWORD_PATH )
@@ -303,9 +304,8 @@ public ChangePasswordRequest requestChangePassword(String email) {
303304 .setClientId (getClientId ())
304305 .setConnection (defaultDbConnection )
305306 .asDictionary ();
306- ParameterizableRequest < Void > request = factory .POST (url , client , mapper )
307+ return factory .POST (url , client , mapper )
307308 .addParameters (parameters );
308- return new ChangePasswordRequest (request );
309309 }
310310
311311 /**
0 commit comments