src/NuGetGallery.Services/Extensions/PrincipalExtensions.cs
/// <summary>
/// Determine if the current user logged in with azure active directory account
/// </summary>
/// <param name="self">Current user principal.</param>
Determine if the current user logged in with azure active directory account
Determine if the current user logged in with azure active directory account
public static bool WasAzureActiveDirectoryAccountUsedForSignin(this IPrincipal self)
        {
            if (self == null || self.Identity == null)
            {
                return false;
            }
            var identity = self.Identity as ClaimsIdentity;
            return ClaimsExtensions.LoggedInWithAzureActiveDirectory(identity);
        }
public static bool WasAzureActiveDirectoryAccountUsedForSignin ( this IPrincipal self ) { if ( self == null || self . Identity == null ) { return false ; } var identity = self . Identity as ClaimsIdentity ; return ClaimsExtensions . LoggedInWithAzureActiveDirectory ( identity ) ; }
Determine if the current user logged in with azure active directory account
Determine if the current user logged in with azure active directory account
IPrincipal
this
self
Current user principal.
Current user principal .