public AuthenticationHelper(string certIssuer, string authURL, IConfiguration config)
        {
            _authURL   = authURL;
            CertIssuer = certIssuer;

            _config = new AuthConfiguration()
            {
                ApiKey       = config[AppConfigurationKey.API_KEY],
                Audience     = config[AppConfigurationKey.AUDIENCE],
                ClientId     = config[AppConfigurationKey.CLIENT_ID],
                ClientSecret = config[AppConfigurationKey.CLIENT_SECRET],
                Issuer       = config[AppConfigurationKey.ISSUER],
                AccessToken  = config[AppConfigurationKey.ACCESS_TOKEN],
                AuthURL      = config[AppConfigurationKey.AUTH_URL],
                Issuers      = config.GetSection("ISSUERS").Get <string[]>(),
                Audiences    = config.GetSection("AUDIENCES").Get <string[]>()
            };
        }
 /// <summary>
 /// todo: insert docstring
 /// </summary>
 /// <param name="certIssuer"></param>
 /// <param name="authURL"></param>
 /// <param name="config"></param>
 /// <param name="silentFailure">set true to return null in case of error, if false an <see cref="HfException"/> is thrown</param>
 public AuthenticationHelper(string certIssuer, string authURL, AuthConfiguration config, bool silentFailure = true) : this(silentFailure)
 {
     _authURL   = authURL;
     CertIssuer = certIssuer;
     _config    = config;
 }