Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SharedKeyCredential

Package version

Defines the SharedKeyCredential .

Hierarchy

  • SharedKeyCredential

Index

Constructors

constructor

  • Initializes a new instance of SharedKeyCredential

    Parameters

    • keyName: string

      The name of the EventHub/ServiceBus key.

    • key: string

      The secret value associated with the above EventHub/ServiceBus key

    Returns SharedKeyCredential

Properties

key

key: string

The secret value associated with the above EventHub/ServiceBus key.

keyName

keyName: string

The name of the EventHub/ServiceBus key.

Methods

Protected _createToken

  • _createToken(expiry: number, audience: string, hashInput?: string | Buffer): AccessToken
  • Creates the sas token based on the provided information

    Parameters

    • expiry: number

      The time period in unix time after which the token will expire.

    • audience: string

      The audience for which the token is desired.

    • Optional hashInput: string | Buffer

      The input to be provided to hmac to create the hash.

    Returns AccessToken

getToken

  • getToken(audience: string): AccessToken
  • Gets the sas token for the specified audience

    Parameters

    • audience: string

      The audience for which the token is desired.

    Returns AccessToken

Static fromConnectionString

Generated using TypeDoc