@s2-dev/streamstore - v0.30.0
    Preparing search index...

    Class S2AccessTokens

    Account-scoped helper for listing, issuing, and revoking access tokens.

    Acquire via S2.accessTokens. Use S2AccessTokens.listAll for async iteration.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    client: Client

    Methods

    • Issue a new access token.

      Parameters

      • args: IssueAccessTokenInput

        Input for issuing an access token.

        • OptionalautoPrefixStreams?: boolean

          Namespace streams based on the configured stream-level scope, which must be a prefix. Stream name arguments will be automatically prefixed, and the prefix will be stripped when listing streams.

        • OptionalexpiresAt?: string | number | Date

          Expiration time (Date, milliseconds since Unix epoch, or RFC 3339 string). If not set, the expiration will be set to that of the requestor's token.

        • id: string

          Access token ID. It must be unique to the account and between 1 and 96 bytes in length, and must not contain NUL bytes.

        • scope: AccessTokenScope

          Access token scope.

      • Optionaloptions: S2RequestOptions

      Returns Promise<IssueAccessTokenResponse>