OAuth Authentication
The UCSDClient authenticates with the UCSD Metadata API using OAuth 2.0 bearer tokens.
Token Acquisitionβ
The GetToken() method:
- Sends a token request to the configured auth URL
- Provides username and password from
MetadataApiOptions - Receives a bearer token
- Includes the token in subsequent API requests as an
Authorization: Bearerheader
Configurationβ
Token acquisition is configured via MetadataApiOptions:
| Setting | Description |
|---|---|
AuthUrl | OAuth token endpoint URL |
BaseUrl | UCSD Metadata API base URL |
TestUrl | Test device endpoint URL |
Username | OAuth username |
Password | OAuth password (Key Vault reference) |
Token Lifecycleβ
- Tokens are acquired per request or cached for their validity period
- If a token expires mid-operation, a new token is requested automatically
- All credentials are stored in Azure App Configuration with Key Vault references β never in source code