feat: step7 auth check#519
feat: step7 auth check#519swaroopAkkineniWorkos wants to merge 13 commits intoENT-5353-base-fga-for-go-sdkfrom
Conversation
|
@greptile review |
|
@greptile re-review plz |
Greptile SummaryThis PR implements the Key changes:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant Client as authorization.Client
participant API as WorkOS API
Caller->>Client: Check(ctx, AuthorizationCheckOpts)
Client->>Client: Validate ResourceIdentifier != nil
Client->>Client: Build JSON body<br/>{permission_slug, resource_id / resource_external_id + resource_type_slug}
Client->>API: POST /authorization/organization_memberships/{id}/check<br/>Authorization: Bearer {apiKey}
API-->>Client: 200 OK {authorized: true/false}<br/>or 4xx/5xx error
Client->>Client: TryGetHTTPError(res)
Client->>Client: json.Decode → AccessCheckResponse
Client-->>Caller: AccessCheckResponse{Authorized}, err
|
This change updates the SDK to call the check() endpoint, handled in authorization.controller.ts