Sha256: 3ab0ca9a3956bf1be35174bece5ddf27122eefd04af9a86229f75d3de6312242

Contents?: true

Size: 1.57 KB

Versions: 9

Compression:

Stored size: 1.57 KB

Contents

<% oauth_tokens = rodauth.scope.instance_variable_get(:@oauth_tokens) %>
<% tokens_count = oauth_tokens.count %>
<% if tokens_count.zero? %>
  <p>No oauth tokens yet!</p>
<% else %>
  <table class="table">
    <thead>
      <tr>
        <th scope="col"><=% rodauth.oauth_applications_name_label %></th>
        <th scope="col"><=% rodauth.oauth_tokens_token_label %></th>
        <th scope="col"><=% rodauth.oauth_tokens_refresh_token_label %></th>
        <th scope="col"><=% rodauth.oauth_tokens_expires_in_label %></th>
        <th scope="col"><=% rodauth.oauth_tokens_scopes_label %></th>
        <th scope="col"><span class="badge badge-pill badge-dark"><%= tokens_count %></span>
      </tr>
    </thead>
    <tbody>
      <% oauth_tokens.each do |oauth_token| %>
        <tr>
          <td><%= oauth_token[rodauth.oauth_applications_name_column] %></td>
          <td><code class="token"><%= oauth_token[rodauth.oauth_tokens_token_column] %></code></td>
          <td><code class="token"><%= oauth_token[rodauth.oauth_tokens_refresh_token_column] %></code></td>
          <td><%= oauth_token[rodauth.oauth_tokens_expires_in_column] %></td>
          <td><%= oauth_token[rodauth.oauth_tokens_scopes_column] %></td>
          <td>
            <%= form_tag rodauth.oauth_token_path(oauth_token[rodauth.oauth_tokens_id_column]), method: :post do %>
              <%= submit_tag rodauth.oauth_token_revoke_button, class: "btn btn-danger" %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= rodauth.oauth_management_pagination_links(oauth_tokens) %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rodauth-oauth-0.10.4 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.10.3 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.10.2 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.10.1 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.10.0 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.9.3 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.9.2 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.9.1 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb
rodauth-oauth-0.9.0 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb