private getOdicToken()

in src/oidc_role_arn_credential.ts [58:69]


  private getOdicToken(oidcTokenFilePath: string): string {
    if (!fs.existsSync(oidcTokenFilePath)) {
      throw new Error(`oidcTokenFilePath ${oidcTokenFilePath}  is not exists.`);
    }
    let oidcToken = null;
    try {
      oidcToken = fs.readFileSync(oidcTokenFilePath, 'utf-8');
    } catch (err) {
      throw new Error(`oidcTokenFilePath ${oidcTokenFilePath} cannot be read.`);
    }
    return oidcToken;
  }