Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Login Issue #1895

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import com.mifos.api.BaseApiManager;
import com.mifos.objects.user.User;

import com.mifos.api.model.LoginData;
import javax.inject.Inject;
import javax.inject.Singleton;

import rx.Observable;

/**
* Created by Rajan Maurya on 19/02/17.
*/
Expand All @@ -27,6 +26,9 @@ public DataManagerAuth(BaseApiManager baseApiManager) {
* @return Basic OAuth
*/
public Observable<User> login(String username, String password) {
return baseApiManager.getAuthApi().authenticate(username, password);
LoginData loginData = new LoginData();
loginData.username = username;
loginData.password = password;
return baseApiManager.getAuthApi().authenticate(loginData);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.mifos.api.model;

public class LoginData {
public String username ;
public String password ;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
package com.mifos.api.services;

import com.mifos.api.model.APIEndPoint;
import com.mifos.api.model.LoginData;
import com.mifos.objects.user.User;

import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
* @author fomenkoo
*/
public interface AuthService {

@POST(APIEndPoint.AUTHENTICATION)
Observable<User> authenticate(@Query("username") String username,
@Query("password") String password);
Observable<User> authenticate(@Body LoginData login );

}