Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add missing 'return'
  • Loading branch information
Maisy authored Feb 1, 2020
commit 7c674accb2238b3ecd036b8be109bd2129e51840
4 changes: 2 additions & 2 deletions click/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class SocialApplication {

@GetMapping("/user")
public Map<String, Object> user(@AuthenticationPrincipal OAuth2User principal) {
Collections.singletonMap("name", principal.getAttribute("name"));
return Collections.singletonMap("name", principal.getAttribute("name"));
}

public static void main(String[] args) {
Expand Down Expand Up @@ -127,4 +127,4 @@ Configuring the `authenticationEntryPoint` achieves this for us.

With those changes in place, the application is complete, and if you run it and visit the home page you should see a nicely styled HTML link to "login with GitHub".
The link takes you not directly to GitHub, but to the local path that processes the authentication (and sends a redirect to GitHub).
Once you have authenticated, you get redirected back to the local app, where it now displays your name (assuming you have set up your permissions in GitHub to allow access to that data).
Once you have authenticated, you get redirected back to the local app, where it now displays your name (assuming you have set up your permissions in GitHub to allow access to that data).