Skip to main content

Configuration

Initialize the Client

Admin Flow (Platform-level access)

For platform-level authentication without client scoping:

from AuthSec_SDK import CIBAClient

client = CIBAClient()

This uses:

  • /ciba/initiate endpoint
  • /ciba/token endpoint
  • Platform-level authentication
  • Best for internal admin tools

Tenant Flow (Client-scoped access)

For multi-tenant, client-scoped authentication:

from AuthSec_SDK import CIBAClient

client = CIBAClient(client_id="your_tenant_client_id")

This uses:

  • /tenant/ciba/initiate endpoint
  • /tenant/ciba/token endpoint
  • Client-scoped authentication
  • Best for customer-facing applications

Custom Base URL

Override the default API endpoint:

from AuthSec_SDK import CIBAClient

client = CIBAClient(
client_id="your_client_id",
base_url="https://your-custom-api.example.com"
)

Configuration Parameters

ParameterTypeRequiredDefaultDescription
client_idstrNoNoneTenant client ID for multi-tenant mode
base_urlstrNohttps://dev.api.authsec.devAPI base URL

Example Configurations

Development Environment

client = CIBAClient(
client_id="dev_client_123",
base_url="https://dev.api.authsec.dev"
)

Production Environment

client = CIBAClient(
client_id="prod_client_456",
base_url="https://api.authsec.dev"
)

Testing Without Client ID

# No client_id for admin flow
client = CIBAClient(base_url="https://test.api.authsec.dev")

Getting a Client ID

To obtain a client_id for tenant flow:

  1. Contact AuthSec support at support@authsec.dev
  2. Or create a tenant via the admin API:
curl -X POST https://dev.api.authsec.dev/api/v1/admin/tenants \
-H "Content-Type: application/json" \
-d '{
"name": "My Company",
"email": "admin@company.com"
}'

Next Steps