Redirect to login.weeztix.com/login per docs; default token host to auth.weeztix.com. Open Ticket setups can override via env. Made-with: Cursor
58 lines
2.0 KiB
PHP
58 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| OAuth login / authorization (browser redirect)
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Official Weeztix: users must be sent to login.weeztix.com with client_id,
|
|
| redirect_uri, response_type=code, and state. Do NOT use auth.../tokens/authorize
|
|
| unless your OAuth provider documents that path (e.g. some Open Ticket setups).
|
|
|
|
|
| Open Ticket example (if your client was created there):
|
|
| WEEZTIX_OAUTH_AUTHORIZE_URL=https://auth.openticket.tech/tokens/authorize
|
|
| WEEZTIX_AUTH_BASE_URL=https://auth.openticket.tech
|
|
|
|
|
*/
|
|
|
|
'oauth_authorize_url' => rtrim((string) env(
|
|
'WEEZTIX_OAUTH_AUTHORIZE_URL',
|
|
'https://login.weeztix.com/login'
|
|
), '/'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Token endpoint base (authorization code + refresh)
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| POST {auth_base_url}/tokens — official Weeztix: https://auth.weeztix.com/tokens
|
|
|
|
|
*/
|
|
|
|
'auth_base_url' => rtrim((string) env('WEEZTIX_AUTH_BASE_URL', 'https://auth.weeztix.com'), '/'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Weeztix API base URL
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
'api_base_url' => rtrim((string) env('WEEZTIX_API_BASE_URL', 'https://api.weeztix.com'), '/'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Current user profile (token validity + company hints)
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Should match the issuer of your access_token (usually same host as auth_base_url).
|
|
|
|
|
*/
|
|
|
|
'user_profile_url' => (string) env('WEEZTIX_USER_PROFILE_URL', 'https://auth.weeztix.com/users/me'),
|
|
|
|
];
|