<commit_before>﻿// Copyright (c) <NAME> & <NAME>. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using System.Collections.Generic;

namespace IdentityModel.Client
{
    public class DiscoveryPolicy
    {
        internal string Authority;

        public bool ValidateIssuerName { get; set; } = true;
        public bool ValidateEndpoints { get; set; } = true;
        public bool RequireKeySet { get; set; } = true;

        public bool RequireHttps { get; set; } = true;
        public bool AllowHttpOnLoopback { get; set; } = true;
        public ICollection<string> LoopbackAddresses = new HashSet<string> { "localhost", "127.0.0.1" };
    }
}<commit_msg>add code comments to discovery policy<commit_after>﻿// Copyright (c) <NAME> & <NAME>. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using System.Collections.Generic;

namespace IdentityModel.Client
{
    public class DiscoveryPolicy
    {
        internal string Authority;

        /// <summary>
        /// Specifies if HTTPS is enforced on all endpoints. Defaults to true.
        /// </summary>
        public bool RequireHttps { get; set; } = true;

        /// <summary>
        /// Specifies if HTTP is allowed on loopback addresses. Defaults to true.
        /// </summary>
        public bool AllowHttpOnLoopback { get; set; } = true;

        /// <summary>
        /// Specifies valid loopback addresses, defaults to localhost and 127.0.0.1
        /// </summary>
        public ICollection<string> LoopbackAddresses = new HashSet<string> { "localhost", "127.0.0.1" };

        /// <summary>
        /// Specifies if the issuer name is checked to be identical to the authority. Defaults to true.
        /// </summary>
        public bool ValidateIssuerName { get; set; } = true;

        /// <summary>
        /// Specifies if all endpoints are checked to belong to the authority. Defaults to true.
        /// </summary>
        public bool ValidateEndpoints { get; set; } = true;

        /// <summary>
        /// Specifies if a key set is required. Defaults to true.
        /// </summary>
        public bool RequireKeySet { get; set; } = true;
    }
}
{'fraction_non_alphanumeric': 0.10897994768962511, 'fraction_numerical': 0.00959023539668701, 'mean_word_length': 2.3260869565217392, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '814144', 'n_tokens_mistral': 634, 'n_tokens_neox': 607, 'n_words': 230}