ru.mynewtons.starter.oauth2.controller.view.AuthController Maven / Gradle / Ivy
package ru.mynewtons.starter.oauth2.controller.view;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("/oauth2")
public class AuthController {
@Value("${starter.oauth2.token.url}")
private String oauthTokenUrl;
@GetMapping("/authorize")
String index(@RequestParam(name = "redirect_uri") String redirectUri, Model model) {
model.addAttribute("redirect_uri", redirectUri);
model.addAttribute("oauth_token_url", oauthTokenUrl);
return "index";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy