login-oauth-grant.ftl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout bodyClass="oauth"; section>
  3. <#if section = "header">
  4. <#if client.attributes.logoUri??>
  5. <img src="${client.attributes.logoUri}"/>
  6. </#if>
  7. <p>
  8. <#if client.name?has_content>
  9. ${msg("oauthGrantTitle",advancedMsg(client.name))}
  10. <#else>
  11. ${msg("oauthGrantTitle",client.clientId)}
  12. </#if>
  13. </p>
  14. <#elseif section = "form">
  15. <div id="kc-oauth" class="content-area">
  16. <h3>${msg("oauthGrantRequest")}</h3>
  17. <ul>
  18. <#if oauth.clientScopesRequested??>
  19. <#list oauth.clientScopesRequested as clientScope>
  20. <li>
  21. <span>${advancedMsg(clientScope.consentScreenText)}</span>
  22. </li>
  23. </#list>
  24. </#if>
  25. </ul>
  26. <#if client.attributes.policyUri?? || client.attributes.tosUri??>
  27. <h3>
  28. <#if client.name?has_content>
  29. ${msg("oauthGrantInformation",advancedMsg(client.name))}
  30. <#else>
  31. ${msg("oauthGrantInformation",client.clientId)}
  32. </#if>
  33. <#if client.attributes.tosUri??>
  34. ${msg("oauthGrantReview")}
  35. <a href="${client.attributes.tosUri}" target="_blank">${msg("oauthGrantTos")}</a>
  36. </#if>
  37. <#if client.attributes.policyUri??>
  38. ${msg("oauthGrantReview")}
  39. <a href="${client.attributes.policyUri}" target="_blank">${msg("oauthGrantPolicy")}</a>
  40. </#if>
  41. </h3>
  42. </#if>
  43. <form class="form-actions" action="${url.oauthAction}" method="POST">
  44. <input type="hidden" name="code" value="${oauth.code}">
  45. <div class="${properties.kcFormGroupClass!}">
  46. <div id="kc-form-options">
  47. <div class="${properties.kcFormOptionsWrapperClass!}">
  48. </div>
  49. </div>
  50. <div id="kc-form-buttons">
  51. <div class="${properties.kcFormButtonsWrapperClass!}">
  52. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" name="accept" id="kc-login" type="submit" value="${msg("doYes")}"/>
  53. <input class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonLargeClass!}" name="cancel" id="kc-cancel" type="submit" value="${msg("doNo")}"/>
  54. </div>
  55. </div>
  56. </div>
  57. </form>
  58. <div class="clearfix"></div>
  59. </div>
  60. </#if>
  61. </@layout.registrationLayout>