...
Step-by-Step Authorization Process
...
Step 1: Developer Opens Swagger UI
What happens:
- Developer navigates to Swagger UI endpoint
- ApiService:
http://localhost:7532/swagger(local dev) - IntegrationServiceAPI:
http://localhost:7098/swagger(local dev)
- ApiService:
- Swagger UI loads, showing all available API endpoints
- All endpoints show a lock icon 🔒 indicating authorization required
Who's involved:
- Developer (Browser)
- Swagger UI
What you see:
- List of all API endpoints organized by controller
- Open lock icons (grayed out) indicating authentication required
- "Authorize" button in the top-right corner
Result:
- Swagger UI is loaded but cannot test endpoints yet
- Need to authenticate first
...
Step 2: Click "Authorize" Button
What happens:
- Developer clicks the "Authorize" button (or clicks a lock icon)
- Modal dialog appears showing available security schemes
- Shows OAuth2 (Authorization Code with PKCE) security scheme
- Displays the required scope for the API
Who's involved:
- Developer
- Swagger UI
Authorization modal shows:
For ApiService:
oauth2 (OAuth2, authorizationCode with PKCE)
Scopes:
api://4dad5d62-dc8c-4378-8bd0-ae736a4d73fe/access_as_user - Access API as user
For IntegrationServiceAPI:
oauth2 (OAuth2, authorizationCode with PKCE)
Scopes:
api://bd5100ee-af63-4880-8c60-47d4207d60c1/access_as_user - Access Integration API as user
Result:
- Developer sees what permissions will be requested
- Ready to start OAuth2 flow
...
Step 3: Initiate OAuth2 Flow
...