Skip to content

Commit

Permalink
👽 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyd-c committed Feb 18, 2019
1 parent 3589878 commit ebccbb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
authRequest.authorize(response);
// 返回授权页面,可自行调整
authRequest.authorize();
// 授权登陆后会返回一个code,用这个code进行登录
authRequest.login("code");
```

#### API列表
Expand Down
6 changes: 6 additions & 0 deletions src/test/java/me/zhyd/oauth/AuthRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public void giteeTest(HttpServletResponse response) {
authRequest.authorize(response);
// 返回授权页面,可自行调整
authRequest.authorize();
// 授权登陆后会返回一个code,用这个code进行登录
authRequest.login("code");
}

@Test
Expand All @@ -42,6 +44,8 @@ public void githubTest(HttpServletResponse response) {
authRequest.authorize(response);
// 返回授权页面,可自行调整
authRequest.authorize();
// 授权登陆后会返回一个code,用这个code进行登录
authRequest.login("code");
}

@Test
Expand All @@ -55,5 +59,7 @@ public void weiboTest(HttpServletResponse response) {
authRequest.authorize(response);
// 返回授权页面,可自行调整
authRequest.authorize();
// 授权登陆后会返回一个code,用这个code进行登录
authRequest.login("code");
}
}

0 comments on commit ebccbb2

Please sign in to comment.