How It Works
Configuration
Environment Variables
Configure Hydra connection via environment variables (see.env.example):
AUTH__ENABLED: Set totrueto enable authenticationAUTH__PROVIDER: Must behydra(only supported provider)HYDRA__ADMIN_URL: Hydra Admin API endpoint for client managementHYDRA__PUBLIC_URL: Hydra Public API endpoint for token operations
Agent Configuration
No additional configuration needed in your agent code. Authentication is handled automatically when environment variables are set.Getting Access Tokens
Method 1: API Request
When you deploy your agent, obtain an access token using the OAuth2 client credentials flow:- Agent DID: Found in the agent card at
/.well-known/agent.json - Client Secret: Located in
.bindu/oauth_credentials.jsonfile
Method 2: UI (Recommended for Testing)
Use the frontend UI to obtain tokens easily:-
Start the frontend:
- Navigate to: Settings → Authentication
-
Enter your
CLIENT_SECRET(from.bindu/oauth_credentials.json) - Click Get Access Token
- Copy the generated token
Using Access Tokens
Include the access token in theAuthorization header for all API requests: