API Keys

Bearer tokens for server-to-server access to forward auth applications.

<%= link_to "New API Key", new_api_key_path, class: "inline-flex items-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900" %>
<% if @api_keys.any? %>
<% @api_keys.each do |key| %> <% end %>
Name Application Created Last Used Expires Status
<%= key.name %> <%= key.application.name %> <%= key.created_at.strftime("%b %d, %Y") %> <%= key.last_used_at ? time_ago_in_words(key.last_used_at) + " ago" : "Never" %> <%= key.expires_at ? key.expires_at.strftime("%b %d, %Y") : "Never" %> <% if key.revoked? %> Revoked <% elsif key.expired? %> Expired <% else %> Active <% end %> <% if key.active? %> <%= button_to "Revoke", api_key_path(key), method: :delete, class: "text-red-600 hover:text-red-900", form: { data: { turbo_confirm: "Revoke this API key? This cannot be undone." } } %> <% end %>
<% else %>

No API keys

Create an API key to authenticate server-to-server requests.

<%= link_to "Create API Key", new_api_key_path, class: "inline-flex items-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700" %>
<% end %>