..
This commit is contained in:
+5
-2
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpSession;
|
|||||||
@IocBean
|
@IocBean
|
||||||
@At("/client/auth")
|
@At("/client/auth")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "客户端登录认证")
|
@Api(tags = "客户端登录认证", value = "/client/auth")
|
||||||
public class ClientAuthController {
|
public class ClientAuthController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -52,6 +52,7 @@ public class ClientAuthController {
|
|||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/sys/login.html")
|
@Ok("beetl:/platform/sys/login.html")
|
||||||
@Filters
|
@Filters
|
||||||
|
@ApiOperation(value = "登录页面", nickname = "", httpMethod = "GET")
|
||||||
public void login(HttpServletRequest req, HttpSession session) {
|
public void login(HttpServletRequest req, HttpSession session) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ public class ClientAuthController {
|
|||||||
@At("/sms-login")
|
@At("/sms-login")
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@AdaptBy(type = JsonAdaptor.class)
|
@AdaptBy(type = JsonAdaptor.class)
|
||||||
@ApiOperation(value = "短信登录")
|
@ApiOperation(value = "短信登录", nickname = "/sms-login", httpMethod = "POST")
|
||||||
public Object doSmsLogin(ClientLoginBody loginBody, HttpServletRequest req) {
|
public Object doSmsLogin(ClientLoginBody loginBody, HttpServletRequest req) {
|
||||||
try {
|
try {
|
||||||
String token = clientAuthService.doSmsLogin(loginBody);
|
String token = clientAuthService.doSmsLogin(loginBody);
|
||||||
@@ -77,6 +78,7 @@ public class ClientAuthController {
|
|||||||
*/
|
*/
|
||||||
@At("/send-sms-code/?")
|
@At("/send-sms-code/?")
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
@ApiOperation(value = "发送短信验证码", nickname = "/send-sms-code", httpMethod = "POST")
|
||||||
public Object sendSmsCode(String phone) {
|
public Object sendSmsCode(String phone) {
|
||||||
try {
|
try {
|
||||||
validateService.getSmsCode(phone);
|
validateService.getSmsCode(phone);
|
||||||
@@ -92,6 +94,7 @@ public class ClientAuthController {
|
|||||||
@At("/logout")
|
@At("/logout")
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||||
|
@ApiOperation(value = "退出登录", nickname = "/logout", httpMethod = "POST")
|
||||||
public Result logout() {
|
public Result logout() {
|
||||||
StpClientUtil.STP.logout();
|
StpClientUtil.STP.logout();
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
Reference in New Issue
Block a user