/// <summary>
        /// Add Security extension - Invokes the AddSecurityBuilder
        /// </summary>
        /// <param name="services">The services collection</param>
        /// <param name="settings">The settings <see cref="SecuritySettings"/></param>
        /// <param name="addSwaggerSecurity">Enable security in Swagger UI</param>
        /// <returns><see cref="IAddSecurityBuilder"/></returns>
        public static IAddSecurityBuilder AddSecurity(this IServiceCollection services, SecuritySettings settings, bool addSwaggerSecurity = false)
        {
            var securitySettings = settings;

            services.AddSingleton(securitySettings);

            AddSecurityBuilder.Create(securitySettings, IsJwtSchemeAdded, services, addSwaggerSecurity);

            IAddSecurityBuilder addSecurityBuilder = AddSecurityBuilder.TheInstance();

            return(addSecurityBuilder);
        }
        /// <summary>
        /// Add swagger and jwt bearer scheme
        /// </summary>
        /// <param name="services">The services collection</param>
        /// <param name="addSwaggerSecurity">Add swagger security</param>
        /// <param name="securitySettings">The security settings</param>
        internal static void AddSwaggerAndJwtBearerScheme(this IServiceCollection services, bool addSwaggerSecurity, SecuritySettings securitySettings)
        {
            if (addSwaggerSecurity)
            {
                services.AddSecureSwaggerDocumentation();
            }

            if (!IsJwtSchemeAdded)
            {
                services.AddJwtBearerScheme(securitySettings);
                IsJwtSchemeAdded = true;
            }
        }