private void ReadCredential(string relativePath, List <Credential> credentials) { var json = Read(relativePath); if (json != null && !json.IsEmpty()) { credentials.Add(StorageJsonUtils.CredentialFromJson(json)); } }
public Credential FindAccessTokenWithScopes(JObject accessTokens, string target) { KeyValuePair <string, JToken>?kvp = FindAccessTokenIterWithScopes(accessTokens, target); if (kvp.HasValue) { return(StorageJsonUtils.CredentialFromJson(JObject.Parse(kvp.Value.Value.ToString()))); } return(null); }