Options
All
  • Public
  • Public/Protected
  • All
Menu

AWS request signer. Refer to Signature Version 4

class

Signer

Hierarchy

  • Signer

Index

Methods

Methods

Static sign

  • sign(request: any, access_info: any, service_info?: any): any
  • Sign a HTTP request, add 'Authorization' header to request param

    method

    sign

    memberof

    Signer

    static

    Parameters

    • request: any

      HTTP request object

      request: {
      method: GET | POST | PUT ...
      url: ...,
      headers: {
      header1: ...
      },
      data: data
      }
      
    • access_info: any

      AWS access credential info

      access_info: {
      access_key: ...,
      secret_key: ...,
      session_token: ...
      }
      
    • Default value service_info: any = null

    Returns any

    Signed HTTP request

Static signUrl

  • signUrl(urlToSign: string, accessInfo: any, serviceInfo?: any, expiration?: number): string
  • signUrl(request: any, accessInfo: any, serviceInfo?: any, expiration?: number): string
  • Parameters

    • urlToSign: string
    • accessInfo: any
    • Optional serviceInfo: any
    • Optional expiration: number

    Returns string

  • Parameters

    • request: any
    • accessInfo: any
    • Optional serviceInfo: any
    • Optional expiration: number

    Returns string