forked from fanruan/finekit
richie
5 years ago
7 changed files with 246 additions and 7 deletions
@ -0,0 +1,93 @@
|
||||
package com.fanruan.api.decision.login; |
||||
|
||||
import com.fr.decision.webservice.bean.authentication.LoginRequestInfoBean; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @version 10.0 |
||||
* Created by richie on 2019/10/14 |
||||
*/ |
||||
public class OpenLoginRequest { |
||||
|
||||
private LoginRequestInfoBean request; |
||||
|
||||
public static OpenLoginRequest create() { |
||||
return wrap(new LoginRequestInfoBean()); |
||||
} |
||||
|
||||
static OpenLoginRequest wrap(LoginRequestInfoBean request) { |
||||
return new OpenLoginRequest(request); |
||||
} |
||||
|
||||
private OpenLoginRequest(LoginRequestInfoBean request) { |
||||
this.request = request; |
||||
} |
||||
|
||||
LoginRequestInfoBean select() { |
||||
return request; |
||||
} |
||||
|
||||
public String getUsername() { |
||||
return request.getUsername(); |
||||
} |
||||
|
||||
public void setUsername(String username) { |
||||
request.setUsername(username); |
||||
} |
||||
|
||||
public String getPassword() { |
||||
return request.getPassword(); |
||||
} |
||||
|
||||
public void setPassword(String password) { |
||||
request.setPassword(password); |
||||
} |
||||
|
||||
public int getValidity() { |
||||
return request.getValidity(); |
||||
} |
||||
|
||||
public void setValidity(int validity) { |
||||
request.setValidity(validity); |
||||
} |
||||
|
||||
public String getMacAddress() { |
||||
return request.getMacAddress(); |
||||
} |
||||
|
||||
public void setMacAddress(String macAddress) { |
||||
request.setMacAddress(macAddress); |
||||
} |
||||
|
||||
public String getDeviceName() { |
||||
return request.getDeviceName(); |
||||
} |
||||
|
||||
public void setDeviceName(String deviceName) { |
||||
request.setDeviceName(deviceName); |
||||
} |
||||
|
||||
public String getOrigin() { |
||||
return request.getOrigin(); |
||||
} |
||||
|
||||
public void setOrigin(String origin) { |
||||
request.setOrigin(origin); |
||||
} |
||||
|
||||
public String getSliderToken() { |
||||
return request.getSliderToken(); |
||||
} |
||||
|
||||
public void setSliderToken(String sliderToken) { |
||||
request.setSliderToken(sliderToken); |
||||
} |
||||
|
||||
public boolean isEncrypted() { |
||||
return request.isEncrypted(); |
||||
} |
||||
|
||||
public void setEncrypted(boolean encrypted) { |
||||
request.setEncrypted(encrypted); |
||||
} |
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.fanruan.api.decision.login; |
||||
|
||||
import com.fr.decision.webservice.bean.authentication.LoginResponseInfoBean; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @version 10.0 |
||||
* Created by richie on 2019/10/14 |
||||
*/ |
||||
public class OpenLoginResponse { |
||||
|
||||
private LoginResponseInfoBean response; |
||||
|
||||
public static OpenLoginResponse create() { |
||||
return wrap(new LoginResponseInfoBean()); |
||||
} |
||||
|
||||
static OpenLoginResponse wrap(LoginResponseInfoBean response) { |
||||
return new OpenLoginResponse(response); |
||||
} |
||||
|
||||
private OpenLoginResponse(LoginResponseInfoBean response) { |
||||
this.response = response; |
||||
} |
||||
|
||||
LoginResponseInfoBean select() { |
||||
return response; |
||||
} |
||||
|
||||
public String getAccessToken() { |
||||
return response.getAccessToken(); |
||||
} |
||||
|
||||
public void setAccessToken(String accessToken) { |
||||
response.setAccessToken(accessToken); |
||||
} |
||||
|
||||
public String getCallback() { |
||||
return response.getCallback(); |
||||
} |
||||
|
||||
public void setCallback(String callback) { |
||||
response.setCallback(callback); |
||||
} |
||||
|
||||
public String getUsername() { |
||||
return response.getUsername(); |
||||
} |
||||
|
||||
public void setUsername(String username) { |
||||
response.setUsername(username); |
||||
} |
||||
|
||||
public int getValidity() { |
||||
return response.getValidity(); |
||||
} |
||||
|
||||
public void setValidity(int validity) { |
||||
response.setValidity(validity); |
||||
} |
||||
|
||||
public String getUrl() { |
||||
return response.getUrl(); |
||||
} |
||||
|
||||
public void setUrl(String url) { |
||||
response.setUrl(url); |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
package com.fanruan.api.decision.macro; |
||||
|
||||
import com.fr.decision.webservice.utils.DecisionServiceConstants; |
||||
import com.fr.general.web.ParameterConstants; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @version 10.0 |
||||
* Created by richie on 2019/10/14 |
||||
* 决策平台常用常量 |
||||
*/ |
||||
public class Constants { |
||||
|
||||
/** |
||||
* 表示用户名参数名的常量 |
||||
*/ |
||||
public static final String FINE_USERNAME = ParameterConstants.FINE_USERNAME; |
||||
|
||||
/** |
||||
* 表示密码参数名的常量 |
||||
*/ |
||||
public static final String FINE_PASSWORD = ParameterConstants.FINE_PASSWORD; |
||||
|
||||
/** |
||||
* 用于表示决策平台主页的常量,需要使用RenderKit#render方法将这个常量生成为实际的url地址 |
||||
* |
||||
* @see com.fanruan.api.util.RenderKit#render(String) |
||||
*/ |
||||
public static final String MAIN_PAGE_URL = DecisionServiceConstants.MAIN_PAGE_URL; |
||||
|
||||
/** |
||||
* 表示认证票据参数名的常量 |
||||
*/ |
||||
public static final String FINE_AUTH_TOKEN_NAME = DecisionServiceConstants.FINE_AUTH_TOKEN_NAME; |
||||
|
||||
/** |
||||
* 记住密码时的最长时间(服务器重启后记住密码也会失效) |
||||
*/ |
||||
public static final long REMEMBER_PASSWORD_LIFE = DecisionServiceConstants.REMEMBER_PASSWORD_LIFE; |
||||
} |
Loading…
Reference in new issue