| | |
| | | |
| | | @RestController |
| | | @CrossOrigin |
| | | @RequestMapping("api/gooleAuth") |
| | | @RequestMapping({"api/gooleAuth", "api/googleAuth"}) |
| | | @Api(tags = "谷歌验证码") |
| | | public class ApiGoogleAuthController { |
| | | @Autowired |
| | |
| | | dto.setGoogleAuthImg(base64); |
| | | dto.setGoogleAuthSecret(secretKey); |
| | | return Result.succeed(dto); |
| | | } |
| | | |
| | | @GetMapping("/get.action") |
| | | @ApiOperation(value = "H5-谷歌身份验证器 获取密钥及二维码") |
| | | public Result<GoogleAuthDto> getAction() { |
| | | return get(); |
| | | } |
| | | |
| | | @PostMapping("/bind") |
| | |
| | | throw new YamiShopBindException("谷歌验证码错误"); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/bind.action") |
| | | @ApiOperation(value = "H5-谷歌身份绑定") |
| | | public Result bindAction(@Valid GoogleAuthBindModel model) { |
| | | return bind(model); |
| | | } |
| | | } |