Skip to main content
All docs
V25.2
  • UserManager.GetLoginProviderName(IPrincipal) Method

    Takes a claims principal and returns the name of the login provider that produced this claims principal.

    Namespace: DevExpress.ExpressApp.Security

    Assembly: DevExpress.ExpressApp.Security.v25.2.dll

    NuGet Package: DevExpress.ExpressApp.Security

    Declaration

    public string GetLoginProviderName(
        IPrincipal principal
    )

    Parameters

    Name Type Description
    principal IPrincipal

    An object that implements the IPrincipal interface.

    Returns

    Type Description
    String

    A System.String value that contains the name of the login provider.

    Remarks

    The following code snippet demonstrates how to use the GetLoginProviderName method:

    using DevExpress.ExpressApp.Security;
    using Microsoft.Extensions.DependencyInjection;
    // ...
    // Use Dependency Injection to access the IServiceProvider.
    var userManager = serviceProvider.GetRequiredService<UserManager>();
    string loginProviderName = userManager.GetLoginProviderName(principal);
    
    See Also