Manages user accounts, roles, and permissions for safety net program APIs.
This service provides authorization context. It: - Links IdP identities to roles and county assignments - Provides claims for JWT enrichment at login - Manages user lifecycle (invite, activate, deactivate)
Not for runtime authorization checks. Permissions are embedded in JWTs and evaluated by domain APIs directly.
Status: Sketch This specification outlines the API shape. Details will be refined during implementation.
https://api.example.com/identity-accessUsers
User account management.
▶
GET
/users
List users
#
List users with filtering by role, county, or status. Requires users:read permission.
| Name | Type | In | Req | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ▶q | string | query | Search query using field:value syntax. Multiple conditions separated by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Search query using field:value syntax. Multiple conditions separated by spaces are ANDed together. URL Encoding: This parameter must be URL-encoded when sent over HTTP. Most HTTP clients handle this automatically. Examples in this documentation show human-readable syntax for clarity. Syntax
Examples
URL Encoding ReferenceWhen manually constructing URLs, encode these characters:
Example: `` | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| limit | integer | query | Maximum number of items to return (1-100). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| offset | integer | query | Number of items to skip before collecting results. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▶sort | string | query | Comma-separated list of fields to sort the response by. Prefix a field | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comma-separated list of fields to sort the response by. Prefix a field with URL Encoding: This parameter must be URL-encoded when sent over HTTP. Most HTTP clients handle this automatically. Examples below show human-readable syntax for clarity. Which fields a given list endpoint allows is declared in the operation's See Syntax
Examples
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▶ UserList
▶ items array[User] required
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ roles Role required Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly system▶ BadRequest
▶ Unauthorized
▶ Forbidden
▶
POST
/users
Create a user
#
Create a new user record. The user must already exist in the IdP. Links the IdP identity (sub) to roles and county assignments. Requires users:create permission.
▶ UserCreate
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ User
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ roles Role required Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly system▶ BadRequest
▶ Unauthorized
▶ Forbidden
▶ Conflict
▶ UnprocessableEntity
▶
GET
/users/me
Get the authenticated user
#
Returns the authenticated user's own record. Resolves the caller identity from the auth context without requiring the caller to know their own ID.
No additional permissions required beyond valid authentication.
▶ User
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ roles Role required Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly system▶ Unauthorized
▶ NotFound
▶
GET
/users/{userId}
Get a user
#
Retrieve a user by ID. Use "me" as the userId to get the current user. Requires users:read permission for other users.
| Name | Type | In | Req | Description |
|---|---|---|---|---|
| userId | string | path | ✓ | Unique identifier of the user. Use "me" to reference the current user. |
▶ User
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ roles Role required Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly system▶ Unauthorized
▶ Forbidden
▶ NotFound
▶
PATCH
/users/{userId}
Update a user
#
Update user role, status, or county assignments. Use "me" as the userId to update current user preferences. Requires users:update permission for other users.
| Name | Type | In | Req | Description |
|---|---|---|---|---|
| userId | string | path | ✓ | Unique identifier of the user. Use "me" to reference the current user. |
▶ UserUpdate
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ User
▶ roles Role Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly systemactive inactive pending suspended▶ roles Role required Role and permissions for authorization.
applicant case_worker supervisor county_admin state_admin partner_readonly system▶ BadRequest
▶ Unauthorized
▶ Forbidden
▶ NotFound
▶ UnprocessableEntity
▶
DELETE
/users/{userId}
Deactivate a user
#
Soft-delete (deactivate) a user. Sets status to inactive. Does not remove from IdP. Requires users:deactivate permission.
| Name | Type | In | Req | Description |
|---|---|---|---|---|
| userId | string | path | ✓ | Unique identifier of the user. Use "me" to reference the current user. |
▶ Unauthorized
▶ Forbidden
▶ NotFound
Token
JWT enrichment (called by IdP).
▶
GET
/token/claims/{sub}
Get claims for JWT enrichment
#
Called by the IdP during login to fetch the user's role and permissions for embedding in the JWT.
When this is called: During OAuth token issuance. When a user logs in, the IdP (Auth0, Okta, etc.) calls this endpoint before issuing the JWT. The returned claims are embedded in the token. This is how permissions get into the JWT without runtime authorization calls.
Authenticated via API key (not user JWT).
| Name | Type | In | Req | Description |
|---|---|---|---|---|
| sub | string | path | ✓ | IdP subject identifier (the user's unique ID in the IdP). |
▶ TokenClaims
applicant case_worker supervisor county_admin state_admin partner_readonly system