Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ClientCredentials

ClientCredentials: IdentityTokenClaims & { privateKey: PrivateJWK }

IdentityTokenClaims

IdentityTokenClaims: { iss: string; sub: string }

Type declaration

  • iss: string

    The token's issuer.

  • sub: string

    The token's subject.

PrivateES256JWK

PrivateES256JWK: BaseJWK & { alg: "ES256"; crv: "P-256"; d: string; kty: "EC"; x: string; y: string }

PrivateJWK

PrivateJWK: PrivateES256JWK

PublicES256JWK

PublicES256JWK: Merge<PrivateES256JWK, { d?: void }>

PublicJWK

PublicJWK: PublicES256JWK

RefreshingTokenProviderParams

RefreshingTokenProviderParams: { audience: string; refreshToken: string; tokenEndpoint: string }

Parameters of a token provider that fetches access tokens via OAuth using a refresh token.

Type declaration

  • audience: string
  • refreshToken: string
  • tokenEndpoint: string

RenewingTokenProviderParams

RenewingTokenProviderParams: { audience?: string; clientId: string; privateKey: PrivateJWK; scopes?: Scope[]; tokenEndpoint?: string }

Parameters of a token provider that fetches access tokens via OAuth using a client key.

Type declaration

  • Optional audience?: string

    The audience to use when using provider's OAuth token retrieval endpoint.

  • clientId: string
  • privateKey: PrivateJWK
  • Optional scopes?: Scope[]

    A list of scopes that will be requested from the identity provider, which may be different from the scopes that the identity provider actually returns.

  • Optional tokenEndpoint?: string

    The identity provider's OAuth token retrieval endpoint.

Scope

Scope: "parcel.full" | `parcel.${ScopeResource}.${ScopeAction}`

SelfIssuedTokenProviderParams

SelfIssuedTokenProviderParams: { principal: string | IdentityId; privateKey: PrivateJWK; scopes?: Scope[]; tokenLifetime?: number }

Parameters of a token provider that signs its own access tokens using a private key.

Type declaration

  • principal: string | IdentityId

    The sub and iss claims of the provided access token.

  • privateKey: PrivateJWK

    The private key that will be used to sign the access token.

  • Optional scopes?: Scope[]

    A list of scopes that will be added as claims. The default is all scopes.

  • Optional tokenLifetime?: number

    Duration for which the issued token is valid, in seconds. Defaults to one hour;

TokenSource

Variables

Const PARCEL_RUNTIME_AUD

PARCEL_RUNTIME_AUD: "https://api.oasislabs.com/parcel" = 'https://api.oasislabs.com/parcel'

Generated using TypeDoc