Polish ref doc for oauth2-client

This commit is contained in:
Joe Grandja 2019-09-20 15:59:11 -04:00
parent 52f0e5287b
commit 076692ceef

View File

@ -202,7 +202,7 @@ public class OAuth2ClientController {
@Autowired @Autowired
private ClientRegistrationRepository clientRegistrationRepository; private ClientRegistrationRepository clientRegistrationRepository;
@RequestMapping("/") @GetMapping("/")
public String index() { public String index() {
ClientRegistration oktaRegistration = ClientRegistration oktaRegistration =
this.clientRegistrationRepository.findByRegistrationId("okta"); this.clientRegistrationRepository.findByRegistrationId("okta");
@ -242,7 +242,7 @@ public class OAuth2ClientController {
@Autowired @Autowired
private OAuth2AuthorizedClientService authorizedClientService; private OAuth2AuthorizedClientService authorizedClientService;
@RequestMapping("/") @GetMapping("/")
public String index(Authentication authentication) { public String index(Authentication authentication) {
OAuth2AuthorizedClient authorizedClient = OAuth2AuthorizedClient authorizedClient =
this.authorizedClientService.loadAuthorizedClient("okta", authentication.getName()); this.authorizedClientService.loadAuthorizedClient("okta", authentication.getName());
@ -1041,7 +1041,7 @@ This is a convenient alternative compared to looking up the `OAuth2AuthorizedCli
@Controller @Controller
public class OAuth2ClientController { public class OAuth2ClientController {
@RequestMapping("/") @GetMapping("/")
public String index(@RegisteredOAuth2AuthorizedClient("okta") OAuth2AuthorizedClient authorizedClient) { public String index(@RegisteredOAuth2AuthorizedClient("okta") OAuth2AuthorizedClient authorizedClient) {
OAuth2AccessToken accessToken = authorizedClient.getAccessToken(); OAuth2AccessToken accessToken = authorizedClient.getAccessToken();