1
0
mirror of synced 2025-12-22 07:21:57 +08:00

📝 添加微信授权登录的帮助文档

This commit is contained in:
yadong.zhang
2019-12-12 11:30:54 +08:00
parent 77c9680333
commit 51603e18ad
11 changed files with 166 additions and 7 deletions

View File

@@ -63,6 +63,7 @@ String authorizeUrl = authRequest.authorize();
import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.request.AuthGithubRequest;
import me.zhyd.oauth.request.AuthRequest;
import me.zhyd.oauth.utils.AuthStateUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -78,7 +79,7 @@ public class RestAuthController {
@RequestMapping("/render")
public void renderAuth(HttpServletResponse response) throws IOException {
AuthRequest authRequest = getAuthRequest();
response.sendRedirect(authRequest.authorize());
response.sendRedirect(authRequest.authorize(AuthStateUtils.createState()));
}
@RequestMapping("/callback")