@extends('layouts.admin') @section('content')

Membership API Tokens

@csrf
@csrf
@if(session('success')) @endif @if(session('error')) @endif @if($currentToken)
Current Active Token

Token Type: {{ $currentToken->token_type }}

Access Token: {{ substr($currentToken->access_token, 0, 50) }}...

@if($currentToken->refresh_token)

Has Refresh Token: Yes

@endif

Created: {{ $currentToken->created_at->format('M d, Y h:i A') }}

Expires: {{ $currentToken->expires_at->format('M d, Y h:i A') }} ({{ $currentToken->expires_at->diffForHumans() }})

@if($currentToken->last_used_at)

Last Used: {{ $currentToken->last_used_at->diffForHumans() }}

@endif

Status: {{ $currentToken->isValid() ? 'Valid' : 'Expired' }}

@csrf
@csrf
@else @endif
Token History
@if($tokens->count() > 0)
@foreach($tokens as $token) @endforeach
ID Token Type Access Token Created Expires Last Used Status Actions
{{ $token->id }} {{ $token->token_type }} {{ substr($token->access_token, 0, 30) }}... {{ $token->created_at->format('M d, Y h:i A') }} {{ $token->expires_at->format('M d, Y h:i A') }} @if($token->last_used_at) {{ $token->last_used_at->diffForHumans() }} @else Never @endif @if($token->is_active) @if($token->isExpired()) Active (Expired) @else Active @endif @else Inactive @endif @if($token->is_active)
@csrf
@else - @endif
{{ $tokens->links() }}
@else
No tokens found in the database.
@endif
API Configuration

Base URL: {{ config('membership_api.base_url') }}

Timeout: {{ config('membership_api.timeout') }} seconds

Username: {{ config('membership_api.username') ? '***' : 'Not set' }}

API Key: {{ config('membership_api.key') ? '***' : 'Not set' }}

@endsection