index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org" xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
  3. <head>
  4. <title>OAuth2 WebClient Showcase</title>
  5. <meta charset="utf-8" />
  6. </head>
  7. <body>
  8. <a th:href="@{/logout}">Log Out</a>
  9. <h1>Examples</h1>
  10. <h2>@RegisteredOAuth2AuthorizedClient</h2>
  11. <p>
  12. Examples on RegisteredOAuth2AuthorizedClientController
  13. <h3>Authenticated</h3>
  14. <ul>
  15. <li><a th:href="@{/annotation/explicit}">Explicit</a> - Explicitly provide a Client Registration Id</li>
  16. <li>
  17. <a th:href="@{/annotation/implicit}">Implicit</a> - Use the currently logged in user's OAuth Token. This will
  18. only work if the user authenticates with oauth2Login and the token provided is the correct token provided at
  19. log in is authorized.</li>
  20. </ul>
  21. <h3>Public</h3>
  22. <ul>
  23. <li><a th:href="@{/public/annotation/explicit}">Explicit</a> - Explicitly provide a Client Registration Id</li>
  24. <li>
  25. <a th:href="@{/public/annotation/implicit}">Implicit</a> - This will fail if the user is not authenticated.
  26. Since it is mapped to permitAll, it is going to fail unless the user already took an action to log in and then
  27. authenticates with oauth2Login()</li>
  28. </ul>
  29. <h2>ServletOAuth2AuthorizedClientExchangeFilterFunction</h2>
  30. <p>
  31. Examples on OAuth2WebClientController that demonstrate how to use ServletOAuth2AuthorizedClientExchangeFilterFunction
  32. <h3>Authenticated</h3>
  33. <ul>
  34. <li><a th:href="@{/webclient/explicit}">Explicit</a> - Explicitly provide a Client Registration Id</li>
  35. <li>
  36. <a th:href="@{/webclient/implicit}">Implicit</a> - Use the currently logged in user's OAuth Token. This will
  37. only work if the user authenticates with oauth2Login and the token provided is the correct token provided at
  38. log in is authorized.</li>
  39. </ul>
  40. <h3>Public</h3>
  41. <ul>
  42. <li><a th:href="@{/public/webclient/explicit}">Explicit</a> - Explicitly provide a Client Registration Id</li>
  43. <li>
  44. <a th:href="@{/public/webclient/implicit}">Implicit</a> - This will fail if the user is not authenticated.
  45. Since it is mapped to permitAll, it is going to fail unless the user already took an action to log in and then
  46. authenticates with oauth2Login()</li>
  47. </ul>
  48. </body>
  49. </html>