Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AsperaOnCloudAuth

Index

Constructors

constructor

Properties

Optional accessToken

accessToken: string

axiosInstance

axiosInstance: AxiosInstance

basePath

basePath: string

Optional clientId

clientId: string

Optional clientSecret

clientSecret: string

Optional org

org: string

Optional redirectUri

redirectUri: string

Methods

getAccessToken

  • getAccessToken(): undefined | string
  • Get the access token used to authenticate to the Aspera On Cloud API.

    Returns undefined | string

    Access token

getAccessTokenWithCode

  • getAccessTokenWithCode(code: string, scope?: string[]): AxiosPromise<any>
  • Get the OAuth2 access token using the authorization code grant type

    Parameters

    • code: string

      The authorization code previously received by the authorization server.

    • scope: string[] = ...

      The granted access to be given to the access token.

    Returns AxiosPromise<any>

    An object containing the access token and associated info.

getAccessTokenWithJwt

  • getAccessTokenWithJwt(email: string, privateKey: Buffer, scope?: string[]): AxiosPromise<any>
  • Get the OAuth2 access token using the JWT bearer token grant type

    Parameters

    • email: string

      The email for the user associated with the private key being used.

    • privateKey: Buffer

      Private key to be used to sign the JWT. The associated public key should be registered in Aspera On Cloud and will be used to verify the assertion.

    • scope: string[] = ...

      The granted access to be given to the access token.

    Returns AxiosPromise<any>

    An object containing the access token and associated info.

getAxios

  • getAxios(): AxiosInstance
  • Get the axios instance used by the AsperaOnCloudAuth class.

    Returns AxiosInstance

    Axios instance

getBasePath

  • getBasePath(): string
  • Get the base path used for Aspera On Cloud API requests.

    Returns string

    Base path for API requests

getClientId

  • getClientId(): undefined | string
  • Get the client id for the API integration.

    Returns undefined | string

    Client id

getClientSecret

  • getClientSecret(): undefined | string
  • Get the client secret for the API integration.

    Returns undefined | string

    Client secret

getOauthUrl

  • getOauthUrl(state?: string, scope?: string[], responseType?: string): string
  • Get the OAuth2 URL used for Aspera on Cloud API authentication

    Parameters

    • Optional state: string

      State to be returned in the redirect URI.

    • scope: string[] = ...

      The granted access to be given to the access token.

    • responseType: string = 'code'

    Returns string

    The URL to be used for Aspera On Cloud API authentication.

getOrg

  • getOrg(): undefined | string
  • Get the Aspera On Cloud organization.

    Returns undefined | string

    Org

getRedirectUri

  • getRedirectUri(): undefined | string
  • Get the redirect uri used by the API integration.

    Returns undefined | string

    Redirect uri

setAccessToken

  • setAccessToken(accessToken: string): void
  • Set the access token used to authenticate to the Aspera On Cloud API.

    Parameters

    • accessToken: string

      Access token

    Returns void