Class

AWSOsduClient

AWSOsduClient(params)

Class that provides an AWS implementation for OSDU API clients.

  • Communicates with AWS Cognito directly to obtain access tokens but does not use the OAuth protocol.
  • Will attempt to refresh access token through Cognito when an unauthorized response is received.
  • Utilizes a credential provider to dynamically obtain Cognito credentials
Constructor

# new AWSOsduClient(params)

Parameters:
Name Type Attributes Description
params Object

The configuration parameters defined below

api_url string

The url for the OSDU API, with or without a trailing /

cognito_client_id string

The client id (non-secret) for the OSDU Cognito user pool

aws_region string

The AWS region in which the OSDU application is deployed

credential_provider AWSOsduBaseCredentialProvider

A credential provider used to dynamically retrieve auth tokens

aws_profile string <optional>

The AWS credential profile to use when making requests to Cognito (typically only for local development)

View Source client/aws/aws.js, line 13

Methods

# protected _refreshAccessToken() → {Promise.<void>}

Internal access token refresh method

  • Configures AWS SDK to use provided credentials for local development or automatic credentials for hosted applications
  • Utilizes credential provider to dynamically fetch updated credentials
  • Brokers communication with AWS Cognito to perform Username/Password authentication and retrieve a new access token for the OSDU Application

View Source client/aws/aws.js, line 40

Promise resolving after the access token on the client has been updated

Promise.<void>