-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathAzureMetadata.cs
More file actions
35 lines (27 loc) · 846 Bytes
/
AzureMetadata.cs
File metadata and controls
35 lines (27 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
namespace Vano.Tools.Azure
{
public class AzureMetadata
{
public string PortalEndpoint { get; set; }
public string LoginEndpoint { get; set; }
public string GraphEndpoint { get; set; }
public string[] Audiences { get; set; }
public bool IsADFS
{
get
{
return IsADFSAuthentication(this.LoginEndpoint);
}
}
internal static bool IsADFSAuthentication(string loginEndpoint)
{
if (string.IsNullOrWhiteSpace(loginEndpoint))
{
throw new ArgumentNullException("LoginEndpoint");
}
Uri loginEndpointUri = new Uri(loginEndpoint);
return (loginEndpointUri.LocalPath != "/");
}
}
}