Skip to content

Authentication Overview

Islamic Open Finance™ provides multiple authentication methods to secure your API access.

MethodUse CaseSecurity Level
API KeysServer-to-serverHigh
OAuth 2.0User delegationHigh
JWT TokensSession-basedMedium

Authorization is handled by Cerbos, providing:

  • ABAC (Attribute-Based Access Control) - Decisions based on attributes
  • RBAC (Role-Based Access Control) - Decisions based on roles
  • Policy-as-Code - Authorization rules defined in YAML
  • Service & Embedded PDPs - Flexible deployment options

The simplest way to authenticate:

Terminal window
curl https://api.islamicopenfinance.com/api/v1/contracts \
-H "Authorization: Bearer iof_sk_live_abc123..."

For user-delegated access:

Terminal window
curl https://api.islamicopenfinance.com/oauth2/token \
-d "grant_type=authorization_code" \
-d "code=auth_code_here" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret"
  1. Never expose secrets in client-side code
  2. Rotate API keys regularly
  3. Use environment variables for credentials
  4. Implement proper key scoping
  5. Monitor API usage for anomalies