createFirstPartyToken | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function createFirstPartyToken

    • Create a token for use with this server

      Type Parameters

      • S extends SchemaTypeDefinition

      Parameters

      • wrdSchema: WRDSchema<S>
      • type: "id"

        Token type - "id" to identfy the user, "api" to allow access on behalf of the user

      • userid: number

        Entity associated with this token

      • Optionaloptions: AuthTokenOptions

      Returns Promise<FirstPartyToken & { expires: Instant }>

    • Create a token for use with this server

      Type Parameters

      • S extends SchemaTypeDefinition

      Parameters

      • wrdSchema: WRDSchema<S>
      • type: "id" | "api"

        Token type - "id" to identfy the user, "api" to allow access on behalf of the user

      • userid: number

        Entity associated with this token

      • Optionaloptions: AuthTokenOptions

      Returns Promise<FirstPartyToken>