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