| | |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.RandomType; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.core.tool.utils.WebUtil; |
| | | import org.springblade.modules.auth.provider.ITokenGranter; |
| | | import org.springblade.modules.auth.provider.TokenGranterBuilder; |
| | | import org.springblade.modules.auth.provider.TokenParameter; |
| | | import org.springblade.modules.auth.sms.MobTechSmsSend; |
| | | import org.springblade.modules.auth.utils.TokenUtil; |
| | | import org.springblade.modules.system.entity.UserInfo; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return Kv.create().set("key", key).set("image", specCaptcha.toBase64()); |
| | | } |
| | | |
| | | @GetMapping("/oauth/smsCode") |
| | | @ApiOperation(value = "发送短信验证码") |
| | | public String sms(@ApiParam(value = "手机号", required = true) @RequestParam String phone) { |
| | | String result = MobTechSmsSend.requestData(phone, StringUtil.random(4, RandomType.INT)); |
| | | // 将key和base64返回给前端 |
| | | return result; |
| | | } |
| | | |
| | | @GetMapping("/oauth/clear-cache") |
| | | @ApiOperation(value = "清除缓存") |
| | | public Kv clearCache() { |