Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Auth Service

Auto-generated from /home/runner/work/feature-flag/feature-flag/proto/auth/v1/auth_service.proto

Package: stitchd.auth.v1

Message: CredentialRequest

A raw credential presented by a caller for validation. Exactly one field must be set.

FieldTypeDescription
bearer_tokenstringA signed JWT issued by the human-auth flow.
sdk_keystringA raw SDK key presented via x-sdk-key header.

Message: RbacContext

Access-control information returned for a validated credential. Downstream services inject this into request context without re-validating.

FieldTypeDescription
tenant_idstring
environment_idstring
rolesrepeated string
permissionsrepeated string
subjectstringThe resolved actor identity (user_id for JWT, sdk_key_id for SDK keys).
is_systemboolTrue when the credential belongs to a user in the platform System org. Used by the gateway to enforce admin-only vs. management-only route separation: admin routes require is_system=true; management routes require is_system=false.

Message: LoginRequest

FieldTypeDescription
emailstring
passwordstring
org_idstringOptional org scope; if empty the first org the user belongs to is used.

Message: LoginResponse

FieldTypeDescription
access_tokenstring
refresh_tokenstring
expires_inint64Seconds until the access token expires.
user_idstring
org_idstring

Message: SwitchOrgRequest

FieldTypeDescription
current_tokenstring
target_org_idstring

Message: SwitchOrgResponse

FieldTypeDescription
access_tokenstring
refresh_tokenstring
expires_inint64
org_idstring

Message: UserOrgEntry

FieldTypeDescription
org_idstring
org_namestring
rolestring

Message: ListUserOrgsRequest

FieldTypeDescription
current_tokenstring

Message: ListUserOrgsResponse

FieldTypeDescription
orgsrepeated UserOrgEntry

Service: AuthService

ValidateCredential

Validates a credential and returns the RBAC context for the caller. Returns UNAUTHENTICATED if the credential is invalid or expired.

  • Request: CredentialRequest
  • Response: RbacContext

LoginWithPassword

Authenticates an email + password credential and issues a JWT.

  • Request: LoginRequest
  • Response: LoginResponse

SwitchOrg

Switches the current user to a different org, issuing a new JWT.

  • Request: SwitchOrgRequest
  • Response: SwitchOrgResponse

ListUserOrgs

Lists all orgs the current user is a member of (excluding System orgs).

  • Request: ListUserOrgsRequest
  • Response: ListUserOrgsResponse