|
|
@@ -1,12 +1,12 @@
|
|
|
/*
|
|
|
* COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
|
|
|
*/
|
|
|
-package kr.co.zumo.app.lifeplus.network;
|
|
|
+package kr.co.zumo.app.lifeplus.network.api;
|
|
|
|
|
|
import io.reactivex.Single;
|
|
|
import io.reactivex.schedulers.Schedulers;
|
|
|
-import kr.co.zumo.app.lifeplus.config.NetworkConfig;
|
|
|
import kr.co.zumo.app.lifeplus.bean.LifeplusAuthBean;
|
|
|
+import kr.co.zumo.app.lifeplus.config.NetworkConfig;
|
|
|
import retrofit2.http.Header;
|
|
|
import retrofit2.http.POST;
|
|
|
|
|
|
@@ -22,15 +22,16 @@ import retrofit2.http.POST;
|
|
|
*/
|
|
|
public class LifeplusAPIService extends RetrofitService {
|
|
|
|
|
|
- private static final String AUTH_URL = NetworkConfig.HOST_URL + ":" + NetworkConfig.HOST_PORT + "/Rest/";
|
|
|
+ private static final String AUTH_URL = NetworkConfig.HOST_URL + ":" + NetworkConfig.HOST_PORT + "/";
|
|
|
private static final String METHOD_GET = "GET";
|
|
|
|
|
|
private static LifeplusAPI api(String url) {
|
|
|
- return retrofit(url, LifeplusAPI.class, 5000);
|
|
|
+ return retrofit(url, LifeplusAPI.class, 2000);
|
|
|
}
|
|
|
|
|
|
- public static Single<LifeplusAuthBean> authorize() {
|
|
|
- return api(AUTH_URL).authorize("", "", METHOD_GET).subscribeOn(Schedulers.io());
|
|
|
+ public static Single<LifeplusAuthBean> authorize(String uuid, String encryptedPin) {
|
|
|
+
|
|
|
+ return api(AUTH_URL).authorize(uuid, encryptedPin).subscribeOn(Schedulers.io());
|
|
|
}
|
|
|
|
|
|
/***********************************
|
|
|
@@ -38,9 +39,7 @@ public class LifeplusAPIService extends RetrofitService {
|
|
|
***********************************/
|
|
|
private interface LifeplusAPI {
|
|
|
|
|
|
- // fixme url 맞도록 수정해야 한다.
|
|
|
-
|
|
|
- @POST("listTest.zumo")
|
|
|
- Single<LifeplusAuthBean> authorize(@Header("encryption_user_no") String userId, @Header("app_ver_info") String appVersionInfo, @Header("method") String method);
|
|
|
+ @POST("api/v1/simple/simpleCheck")
|
|
|
+ Single<LifeplusAuthBean> authorize(@Header("device_token") String deviceId, @Header("pin_code") String pin);
|
|
|
}
|
|
|
}
|