github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/assets/templates/authorize.html (about)

     1  <!DOCTYPE html>
     2  <html lang="{{.Locale}}">
     3    <head>
     4      <meta charset="utf-8">
     5      <meta name="viewport" content="width=device-width, initial-scale=1">
     6      <meta name="theme-color" content="#fff">
     7      <title>{{.Title}}</title>
     8      <link rel="stylesheet" href="{{asset .Domain "/fonts/fonts.css" .ContextName}}">
     9      <link rel="stylesheet" href="{{asset .Domain "/css/cozy-bs.min.css" .ContextName}}">
    10      <link rel="stylesheet" href="{{asset .Domain "/styles/theme.css" .ContextName}}">
    11      <link rel="stylesheet" href="{{asset .Domain "/styles/cirrus.css" .ContextName}}">
    12      {{.Favicon}}
    13    </head>
    14    <body class="cirrus modal-open">
    15      <div class="modal d-block theme-inverted" tabindex="-1" aria-modal="true" role="dialog">
    16        <div class="modal-dialog modal-dialog-centered">
    17          <main role="application" class="modal-content">
    18            <div class="modal-icon">
    19              <span class="icon icon-permissions"></span>
    20            </div>
    21            <div class="modal-body mt-4 mt-md-1 p-md-5">
    22              <form method="POST" action="/auth/authorize" class="d-contents" id="authorizeform">
    23                <input type="hidden" name="csrf_token" value="{{.CSRF}}" />
    24                <input type="hidden" name="client_id" value="{{.Client.ClientID}}" />
    25                <input type="hidden" name="state" value="{{.State}}" />
    26                <input type="hidden" name="redirect_uri" value="{{.RedirectURI}}" />
    27                <input type="hidden" name="scope" value="{{.Scope}}" />
    28                <input type="hidden" name="response_type" value="code" />
    29                <input type="hidden" name="code_challenge" value="{{.Challenge}}" />
    30                <input type="hidden" name="code_challenge_method" value="{{.ChallengeMethod}}" />
    31  
    32                {{if .Webapp}}
    33                <h1 class="h4 h2-md mb-4 text-center">{{t "Authorize Linked Title"}}</h1>
    34                <div class="alert alert-info mb-4">
    35                  <p class="mb-2">{{t "Authorize Linked Webapp"}}</p>
    36                  <div class="card card-elevation shadow rounded-pill authorize-pill mb-2">
    37                    <img width="24" height="24" src="/registry/{{.Webapp.Slug}}/icon" />
    38                    <span class="small ms-1">{{.Webapp.Name}}</span>
    39                  </div>
    40                  <p class="mb-2">{{t "Authorize Linked YourCozy"}}</p>
    41                  <div class="card card-elevation shadow rounded-pill authorize-pill mb-0">
    42                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 52 52">
    43                      <path fill="#297EF2" fill-rule="evenodd" d="M558.23098,44 L533.76902,44 C526.175046,44 520,37.756072 520,30.0806092 C520,26.4203755 521.393962,22.9628463 523.927021,20.3465932 C526.145918,18.0569779 529.020185,16.6317448 532.129554,16.2609951 C532.496769,13.1175003 533.905295,10.2113693 536.172045,7.96901668 C538.760238,5.40737823 542.179607,4 545.800788,4 C549.420929,4 552.841339,5.40737823 555.429532,7.96796639 C557.686919,10.2008665 559.091284,13.0912433 559.467862,16.2179336 C566.482405,16.8533543 572,22.8284102 572,30.0816594 C572,37.756072 565.820793,44 558.22994,44 L558.23098,44 Z M558.068077,40.9989547 L558.171599,40.9989547 C564.142748,40.9989547 569,36.0883546 569,30.0520167 C569,24.0167241 564.142748,19.1061239 558.171599,19.1061239 L558.062901,19.1061239 C557.28338,19.1061239 556.644649,18.478972 556.627051,17.6887604 C556.492472,11.7935317 551.63729,7 545.802791,7 C539.968291,7 535.111039,11.7956222 534.977495,17.690851 C534.959896,18.4664289 534.34187,19.0914904 533.573737,19.1092597 C527.743378,19.2451426 523,24.1536522 523,30.0530619 C523,36.0893999 527.857252,41 533.828401,41 L533.916395,41 L533.950557,40.9979094 C533.981614,40.9979094 534.01267,40.9979094 534.043727,41 L558.064971,41 L558.068077,40.9989547 Z M553.766421,29.2227318 C552.890676,28.6381003 552.847676,27.5643091 552.845578,27.5171094 C552.839285,27.2253301 552.606453,26.9957683 552.32118,27.0000592 C552.035908,27.0054228 551.809368,27.2467844 551.814612,27.5364185 C551.81671,27.5750363 551.831393,28.0792139 552.066323,28.6735 C548.949302,31.6942753 544.051427,31.698566 540.928113,28.6917363 C541.169336,28.0888684 541.185068,27.576109 541.185068,27.5374911 C541.190312,27.2478572 540.964821,27.0086409 540.681646,27.0011319 C540.401618,26.9925502 540.163541,27.2264027 540.154102,27.5160368 C540.154102,27.5589455 540.11215,28.6370275 539.234308,29.2216592 C538.995183,29.3825669 538.92806,29.7097461 539.08433,29.9532532 C539.182917,30.1077246 539.346529,30.1924694 539.516434,30.1924694 C539.612923,30.1924694 539.710461,30.1645787 539.797512,30.1066519 C540.023003,29.9564713 540.211786,29.7848363 540.370154,29.6024742 C542.104862,31.2008247 544.296845,32 546.488828,32 C548.686055,32 550.883282,31.1976066 552.621136,29.5917471 C552.780553,29.7762546 552.971434,29.9521804 553.203218,30.1066519 C553.289219,30.1645787 553.387806,30.1924694 553.484295,30.1924694 C553.652102,30.1924694 553.816763,30.1066519 553.916399,29.9521804 C554.07162,29.7076006 554.004497,29.3793488 553.766421,29.2205864 L553.766421,29.2227318 Z" transform="translate(-520)"/>
    44                    </svg>
    45                    <span class="small ms-1">{{.InstanceSlugName}}<wbr/>.{{.InstanceDomain}}</span>
    46                  </div>
    47                </div>
    48                <p class="mb-3">{{t "Authorize Linked Help"}}</p>
    49                {{else}}
    50                <h1 class="h4 h2-md mb-3 text-center">{{t "Authorize Title" .Client.ClientName}}</h1>
    51                {{if .Client.LogoURI}}
    52                <img class="mb-3" src="{{.Client.LogoURI}}" height="48" />
    53                {{end}}
    54                <p class="mb-3">
    55                  <strong>
    56                  {{if .Client.ClientURI}}
    57                  <a href="{{.Client.ClientURI}}">{{.Client.ClientName}}</a>
    58                  {{else}}
    59                  {{.Client.ClientName}}
    60                  {{end}}
    61                  </strong>
    62                  {{t "Authorize Client presentation"}}<br />
    63                  {{if .Domain}}
    64                  <strong>{{.Domain}}</strong> :<br />
    65                  {{end}}
    66                </p>
    67                {{end}}
    68  
    69                <ul class="alert alert-info permissions-list mb-4">
    70                  {{range $index, $perm := .Permissions}}
    71                  <li>
    72                    <span class="halo-icon shadow"><span class="{{replace $perm.Type "." "-" -1}} icon perm"></span></span>
    73                    <span class="small">
    74                      {{- t $perm.TranslationKey -}}
    75                      {{- if hasSuffix $perm.Type ".*"}}{{t "Permissions Wildcard"}}{{end -}}
    76                      {{- if $perm.Verbs.ReadOnly}}{{t "Permissions Read only"}}{{end -}}
    77                    </span>
    78                  </li>
    79                  {{end}}
    80                </ul>
    81                {{if .Client.PolicyURI}}
    82                <p class="d-sm-none mb-3">
    83                  {{t "Authorize Policy sentence"}}
    84                  <a href="{{.Client.PolicyURI}}">{{t "Authorize Policy link"}}</a>.
    85                </p>
    86                {{end}}
    87                <p class="mb-3">{{tHTML "Authorize Give permission"}}</p>
    88                <button type="submit" class="btn btn-primary btn-md-lg w-100">
    89                  {{t "Authorize Submit"}}
    90                </button>
    91  
    92              </form>
    93            </div>
    94            <a href="{{.CloseURI}}" class="btn btn-icon position-absolute top-0 end-0 cancel" aria-label="Close">
    95              <span class="icon icon-cross"></span>
    96            </a>
    97          </div>
    98        </div>
    99      </div>
   100      <div class="modal-backdrop show"></div>
   101      <script src="{{asset .Domain "/scripts/cirrus.js"}}"></script>
   102    </body>
   103  </html>