2023-10-20 12:51:01 +00:00
|
|
|
<div>
|
2024-06-07 09:01:10 +00:00
|
|
|
<x-slot:title>
|
|
|
|
API Tokens | Coolify
|
|
|
|
</x-slot>
|
2023-10-20 12:51:01 +00:00
|
|
|
<x-security.navbar />
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<h2 class="pb-4">API Tokens</h2>
|
|
|
|
<x-helper
|
|
|
|
helper="Tokens are created with the current team as scope. You will only have access to this team's resources." />
|
|
|
|
</div>
|
|
|
|
<h4>Create New Token</h4>
|
2023-12-07 18:06:32 +00:00
|
|
|
<form class="flex items-end gap-2 pt-4" wire:submit='addNewToken'>
|
2023-10-20 12:51:01 +00:00
|
|
|
<x-forms.input required id="description" label="Description" />
|
|
|
|
<x-forms.button type="submit">Create New Token</x-forms.button>
|
|
|
|
</form>
|
|
|
|
@if (session()->has('token'))
|
2024-03-25 09:41:44 +00:00
|
|
|
<div class="py-4 font-bold dark:text-warning">Please copy this token now. For your security, it won't be shown again.
|
2023-10-20 12:51:01 +00:00
|
|
|
</div>
|
2024-03-24 15:00:25 +00:00
|
|
|
<div class="pb-4 font-bold dark:text-white"> {{ session('token') }}</div>
|
2023-10-20 12:51:01 +00:00
|
|
|
@endif
|
|
|
|
<h4 class="py-4">Issued Tokens</h4>
|
|
|
|
<div class="grid gap-2 lg:grid-cols-1">
|
|
|
|
@forelse ($tokens as $token)
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<div
|
2024-03-24 15:00:25 +00:00
|
|
|
class="flex items-center gap-2 group-hover:dark:text-white p-2 border border-coolgray-200 hover:dark:text-white hover:no-underline min-w-[24rem] cursor-default">
|
2023-10-20 12:51:01 +00:00
|
|
|
<div>{{ $token->name }}</div>
|
|
|
|
</div>
|
2024-03-21 11:44:32 +00:00
|
|
|
<x-modal-confirmation isErrorButton action="revoke({{ data_get($token, 'id') }})">
|
|
|
|
<x-slot:button-title>
|
|
|
|
Revoke token
|
|
|
|
</x-slot:button-title>
|
|
|
|
This API Token will be deleted and anything using it will fail. <br>Please think again.
|
|
|
|
</x-modal-confirmation>
|
2023-10-20 12:51:01 +00:00
|
|
|
</div>
|
|
|
|
@empty
|
|
|
|
<div>
|
|
|
|
<div>No API tokens found.</div>
|
|
|
|
</div>
|
|
|
|
@endforelse
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|