GeoNetAgent, LDAPWeb, server-audit, server-connection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
4.5 KiB

<div class="flex flex-col xl:flex-row gap-6 items-start">
<div class="flex-1 min-w-0 space-y-8 max-h-[calc(100vh-12rem)] overflow-y-auto pr-1">
<section class="bg-slate-900 border border-slate-800 rounded-2xl p-6">
<h2 class="text-xl font-semibold text-white mb-4">Base URL</h2>
<pre class="bg-slate-950 border border-slate-800 rounded-lg p-4 text-sm text-cyan-300 overflow-x-auto">{{ $baseUrl }}</pre>
<p class="text-slate-400 text-sm mt-3">OAuth2 token endpoint: <span class="text-cyan-400">{{ $oauthUrl }}</span></p>
</section>
<section class="bg-slate-900 border border-slate-800 rounded-2xl p-6">
<h2 class="text-xl font-semibold text-white mb-4">Autentikasi (pilih salah satu)</h2>
<div class="space-y-6 text-sm">
<div>
<h3 class="text-cyan-400 font-medium mb-2">1. API Token</h3>
<p class="text-slate-400 mb-2">Token statis
@if (session('ldap_is_admin'))
— buat di <a href="{{ route('api-clients.index') }}" class="text-cyan-400 hover:underline">API Clients</a>.
@else
— hubungi administrator.
@endif
</p>
<pre class="bg-slate-950 border border-slate-800 rounded-lg p-3 text-xs text-slate-300">Authorization: Bearer dbl_xxxxxxxx</pre>
</div>
<div>
<h3 class="text-cyan-400 font-medium mb-2">2. LDAP Bearer (JWT)</h3>
<p class="text-slate-400 mb-2">Uji via tab <strong>Live API</strong><code class="text-cyan-300">POST /auth/login</code>, salin <code class="text-cyan-300">access_token</code>, klik <strong>Authorize</strong>.</p>
</div>
<div>
<h3 class="text-cyan-400 font-medium mb-2">3. OAuth2 Client Credentials</h3>
<p class="text-slate-400 mb-2">Request token ke <code class="text-cyan-300">{{ $oauthUrl }}</code> dengan client_id & client_secret.</p>
</div>
</div>
</section>
<section class="bg-slate-900 border border-slate-800 rounded-2xl p-6">
<h2 class="text-xl font-semibold text-white mb-4">Scopes</h2>
<table class="min-w-full text-sm">
<tbody class="text-slate-300 divide-y divide-slate-800">
@foreach ($scopes as $key => $label)
<tr><td class="py-2 font-mono text-cyan-300 w-40">{{ $key }}</td><td class="py-2">{{ $label }}</td></tr>
@endforeach
</tbody>
</table>
</section>
<section class="bg-slate-900 border border-slate-800 rounded-2xl p-6">
<h2 class="text-xl font-semibold text-white mb-4">Error Responses</h2>
<div class="space-y-3 text-xs font-mono text-slate-300">
<p><span class="text-amber-400">401</span> — unauthorized (token invalid)</p>
<p><span class="text-amber-400">403</span> — forbidden (scope tidak cukup)</p>
<p><span class="text-amber-400">404</span> — not found</p>
<p><span class="text-amber-400">422</span> — validation error</p>
<p><span class="text-amber-400">503</span> — service error (LDAP/SQL)</p>
</div>
</section>
</div>
<aside class="w-full xl:w-80 shrink-0 bg-slate-900 border border-slate-800 rounded-2xl p-5 xl:sticky xl:top-6">
<h2 class="text-lg font-semibold text-white mb-4">Catatan</h2>
<dl class="space-y-4 text-sm">
<div>
<dt class="font-medium text-cyan-400 mb-1">Live testing</dt>
<dd class="text-slate-400">Gunakan tab <strong>Live API</strong> seperti FastAPI /docs — klik <strong>Try it out</strong> pada endpoint.</dd>
</div>
<div>
<dt class="font-medium text-cyan-400 mb-1">Authorize</dt>
<dd class="text-slate-400">Setelah login LDAP atau punya token, klik tombol hijau <strong>Authorize</strong> dan paste Bearer token.</dd>
</div>
@if (session('ldap_is_admin'))
<div>
<dt class="font-medium text-emerald-400 mb-1">Kelola token</dt>
<dd class="text-slate-400"><a href="{{ route('api-clients.index') }}" class="text-cyan-400 hover:underline">API Clients</a></dd>
</div>
@endif
</dl>
</aside>
</div>