/// <summary> /// Creates a new <see cref="AzureAuthority"/> with an optional authority host url. /// </summary> /// <param name="authorityHostUrl">Optional: sets a non-default authority host url.</param> public AzureAuthority(string authorityHostUrl = DefaultAuthorityHostUrl) { Debug.Assert(Uri.IsWellFormedUriString(authorityHostUrl, UriKind.Absolute), "The authorityHostUrl parameter is invalid."); AuthorityHostUrl = authorityHostUrl; _adalTokenCache = new VstsAdalTokenCache(); }
/// <summary> /// Creates a new <see cref="AzureAuthority"/> with an optional authority host url. /// </summary> /// <param name="authorityHostUrl">Optional: sets a non-default authority host url.</param> public AzureAuthority(string authorityHostUrl = DefaultAuthorityHostUrl) { if (String.IsNullOrEmpty(authorityHostUrl)) throw new ArgumentNullException(nameof(authorityHostUrl)); if (!Uri.IsWellFormedUriString(authorityHostUrl, UriKind.Absolute)) throw new ArgumentException(nameof(authorityHostUrl)); AuthorityHostUrl = authorityHostUrl; _adalTokenCache = new VstsAdalTokenCache(); }