/// <summary> /// Loads the token list. /// </summary> /// <param name="tokenConfigurationSection">The token configuration section.</param> /// <returns>Dictionary<System.String, ApiTokenModel>.</returns> private static Dictionary <string, JwtTokenModel> LoadTokenList(TokenConfigurationSection tokenConfigurationSection) { var tokens = new Dictionary <string, JwtTokenModel>(); for (var i = 0; i < tokenConfigurationSection.Members.Count; i++) { var definition = tokenConfigurationSection.Members[i].Definition; var tokenName = tokenConfigurationSection.Members[i].Name; if (definition?.Signature == null || tokens.ContainsKey(tokenName)) { continue; } tokens.Add(tokenName, new JwtTokenModel(tokenName, definition)); } return(tokens); }
public TokenConfiguration(TokenConfigurationSection tokenConfigurationSection) { _tokenConfigurationSection = tokenConfigurationSection; }