github.com/qubitproducts/logspray@v0.2.14/server/swagger-ui/src/main/template/oauth2.handlebars (about)

     1  <div>
     2      <h3 class="auth__title">OAuth2.0</h3>
     3      <p>{{{sanitize description}}}</p>
     4      {{#if authorizationUrl}}<p>Authorization URL: {{{sanitize authorizationUrl}}}</p>{{/if}}
     5      {{#if tokenUrl}}<p>Token URL: {{{sanitize tokenUrl}}}</p>{{/if}}
     6      <p>flow: {{{escape flow}}}</p>
     7      {{#if isPasswordFlow}}
     8          <p>Please input username and password for password flow authorization</p>
     9          <fieldset>
    10              <div><label>Username: <input class="oauth-username" type="text" name="username"></label></div>
    11              <div><label>Password: <input class="oauth-password" type="password" name="password"></label></div>
    12          </fieldset>
    13      {{/if}}
    14      {{#if clientAuthentication}}
    15          <p>Setup client authentication.{{#if requireClientAuthenticaiton}}(Required){{/if}}</p>
    16          <fieldset>
    17              <div><label>Type:
    18                  <select class="oauth-client-authentication-type" name="client-authentication-type">
    19                      <option value="none" selected>None or other</option>
    20                      <option value="basic">Basic auth</option>
    21                      <option value="request-body">Request body</option>
    22                  </select>
    23              </label></div>
    24              <div class="oauth-client-authentication" hidden>
    25                  <div><label>ClientId: <input class="oauth-client-id" type="text" name="client-id"></label></div>
    26                  <div><label>Secret: <input class="oauth-client-secret" type="text" name="client-secret"></label></div>
    27              </div>
    28          </fieldset>
    29      {{/if}}
    30      <p><strong> {{{escape appName}}} </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>
    31      <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.
    32          <a href="#">Learn how to use</a>
    33      </p>
    34      <ul class="api-popup-scopes">
    35          {{#each scopes}}
    36              <li>
    37                  <input class="oauth-scope" type="checkbox" data-scope="{{{escape scope}}}" oauthtype="{{{escape OAuthSchemeKey}}}"/>
    38                  <label>{{{escape scope}}}</label><br/>
    39                  <span class="api-scope-desc">{{{escape description}}}
    40                      {{#if OAuthSchemeKey}}
    41                          ({{{escape OAuthSchemeKey}}})
    42                      {{/if}}
    43                  </span>
    44              </li>
    45          {{/each}}
    46      </ul>
    47  </div>