|
@@ -36,27 +36,27 @@ public class AuthorizeController {
|
|
|
private UserService userService;
|
|
|
|
|
|
/**
|
|
|
- * 短信登陆
|
|
|
+ * 发送验证码短信
|
|
|
*
|
|
|
- * @param param 登陆参数
|
|
|
- * @return 认证信息
|
|
|
+ * @param param 手机号参数
|
|
|
+ * @return 短信会话信息
|
|
|
*/
|
|
|
@Authorize(enabled = false)
|
|
|
- @PostMapping("/login/sms")
|
|
|
- public Authorization loginWithSms(@RequestBody @Valid AuthorizeParam.Sms param) {
|
|
|
- return this.authorizeClient.authorize(param);
|
|
|
+ @PostMapping("/sms/captcha")
|
|
|
+ public SmsSession sendCaptcha(@RequestBody @Valid MobileParam param) {
|
|
|
+ return this.captchaSmsHandler.send(param.getMobile());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 发送短信登陆验证码
|
|
|
+ * 短信登陆
|
|
|
*
|
|
|
- * @param param 手机号参数
|
|
|
- * @return 短信会话信息
|
|
|
+ * @param param 登陆参数
|
|
|
+ * @return 认证信息
|
|
|
*/
|
|
|
@Authorize(enabled = false)
|
|
|
- @PostMapping("/login/sms/captcha")
|
|
|
- public SmsSession sendCaptcha(@RequestBody @Valid MobileParam param) {
|
|
|
- return this.captchaSmsHandler.send(param.getMobile());
|
|
|
+ @PostMapping("/login/sms")
|
|
|
+ public Authorization loginWithSms(@RequestBody @Valid AuthorizeParam.Sms param) {
|
|
|
+ return this.authorizeClient.authorize(param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -77,6 +77,7 @@ public class AuthorizeController {
|
|
|
* @param param 刷新参数
|
|
|
* @return 认证信息
|
|
|
*/
|
|
|
+ @Authorize(enabled = false)
|
|
|
@PostMapping("/token/refresh")
|
|
|
public Authorization refreshToken(@RequestBody @Valid AuthorizeParam.Refresh param) {
|
|
|
return this.authorizeClient.authorize(param);
|