/**
 * Interface for objects that represent API Access Tokens.
 */ export interface IAccessToken { returns { string } identity ( ) : string ; returns { string } toString ( ) : string ; } /**
 * Interface for objects that provide context to the
 *  IAccessTokenProvider implementations, i.e. which operation
 * is being performed, identity of the user performing the operation
 * and whether to force a new token to be retrieved in case the tokens
 * are being cached by the provider.
  export interface ITokenContext { /**
     * Name of the Service requested.
     */ readonly service : string ; /**
     * Identity of the user performing the operation that
     * requires Access Token. May be `undefined`.
     */ readonly identity ? : string ; /**
     * Name of the operation that requires an Access Token.
     */ readonly operation : string ; /**
     * Indicates whether to force a new token to be retrieved in case the
     * tokens are being cached by the provider.
     */ readonly forceReload ? : boolean ; } /**
 * Interface to be implemented by classes able to provide API
 * Access Tokens asynchronously.
 */ export interface IAccessTokenProvider { param { ITokenContext } context returns { Promise < IAccessToken > } getToken ( context ) : Promise < IAccessToken > ; }