Skip to content

Three issues found while using the SDK from a real AS #32

@zamd

Description

@zamd

While building a TypeScript OAuth Authorization Server on top of @authlete/typescript-sdk, I hit following three issues on the latest SDK:

1. ticket/updateinfo field has the wrong type

The SDK types info as a string, but the live API requires info: { context: string } (same shape that ticket/info returns).

What happens: sending the string form returns A126202 — invalid value for field '$.info'. Zod validates the request before sending, so as any doesn't help. I had to drop down to fetch for this one endpoint.

Suggested fix: retype info in the OpenAPI spec.

2. federation/configuration — can't send entityTypes filter

FederationConfigurationApiRequestBody is generated as an empty {}, so there's no way to pass the entityTypes filter. The Java reference sends entityTypes: [\"OPENID_PROVIDER\", \"OPENID_CREDENTIAL_ISSUER\"].

What happens: I just can't pass the filter. Authlete falls back to emitting all enabled types, which works fine for me — but it's not canonical with the Java behavior.

Suggested fix: add entityTypes?: EntityType[] to the request body schema.

3. federation/configurationrequestBody is typed optional but isn't really

requestBody is ?: ... on the request type. If I omit it, the SDK still sets Content-Type: application/json but sends no body.

What happens: Authlete returns 400 (it needs a JSON body when Content-Type says JSON), and the SDK throws AuthleteError. Easy to miss because the type says it's optional.

Workaround: explicitly pass requestBody: {}.

Suggested fix: either default requestBody to {} before sending, or make it non-optional in the type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions