/// <exception cref="T:System.OverflowException"> /// <paramref name="configuration[JwtSettings:HoursToExpire]"/> represents a /// number less than <see cref="F:System.Int32.MinValue"/> or greater than <see cref="F:System.Int32.MaxValue"/>. /// </exception> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="configuration[JwtSettings:HoursToExpire]"/> is /// <see langword="null"/>. /// </exception> /// <exception cref="T:System.NotSupportedException">Inner JWT configuration was null.</exception> /// <exception cref="T:System.FormatException"> /// <paramref name="configuration[JwtSettings:HoursToExpire]"/> is not in the /// correct format. /// </exception> #endregion public static void AddJwtSettings(this IServiceCollection services, IConfiguration configuration) { JwtConfiguration.Initialize(configuration); services.AddSingleton(JwtConfiguration.Configuration); }