<?php

return [

    /*
    |--------------------------------------------------------------------------
    | JWT RSA Keys
    |--------------------------------------------------------------------------
    |
    | The RSA key content is read directly from environment variables.
    | In your .env file, use the key content with newlines replaced by \n:
    |
    |   JWT_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEv..."
    |   JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIj..."
    |
    */

    'private_key' => env('JWT_PRIVATE_KEY'),
    'public_key'  => env('JWT_PUBLIC_KEY'),

    /*
    |--------------------------------------------------------------------------
    | Token Lifetime (minutes)
    |--------------------------------------------------------------------------
    */

    'ttl' => (int) env('JWT_TTL', 60),

    /*
    |--------------------------------------------------------------------------
    | Issuer & Audience
    |--------------------------------------------------------------------------
    */

    'issuer'   => env('JWT_ISSUER', env('APP_URL', 'http://localhost')),
    'audience' => env('JWT_AUDIENCE', ''),

    /*
    |--------------------------------------------------------------------------
    | Cookie Settings
    |--------------------------------------------------------------------------
    |
    | The JWT is sent to the browser as an HTTP-only cookie so it is
    | automatically included in requests to the second application.
    |
    */

    'cookie_name'     => env('JWT_COOKIE_NAME', 'wa_jwt'),
    'cookie_domain'   => env('JWT_COOKIE_DOMAIN', null),
    'cookie_path'     => env('JWT_COOKIE_PATH', '/'),
    'cookie_secure'   => env('JWT_COOKIE_SECURE', true),
    'cookie_samesite' => env('JWT_COOKIE_SAMESITE', 'Lax'),

];
