当前位置: 首页>>代码示例>>C#>>正文


C# ApplicationUserManager.CreateIdentityAsync方法代码示例

本文整理汇总了C#中ApplicationUserManager.CreateIdentityAsync方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationUserManager.CreateIdentityAsync方法的具体用法?C# ApplicationUserManager.CreateIdentityAsync怎么用?C# ApplicationUserManager.CreateIdentityAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ApplicationUserManager的用法示例。


在下文中一共展示了ApplicationUserManager.CreateIdentityAsync方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegenerateIdentityCallback

 /// <summary>
 /// Regenerates the identity callback function for cookie configuration (above).
 /// </summary>
 /// <param name="applicationUserManager">The application user manager.</param>
 /// <param name="applicationUser">The application user.</param>
 private static async Task<ClaimsIdentity> RegenerateIdentityCallback(ApplicationUserManager applicationUserManager, ApplicationUser applicationUser)
 {
     // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
     var userIdentity = await applicationUserManager.CreateIdentityAsync(applicationUser, DefaultAuthenticationTypes.ApplicationCookie);
     // Add custom user claims here
     return userIdentity;
 }
开发者ID:targitaj,项目名称:m3utonetpaleyerxml,代码行数:12,代码来源:AuthenticationHelper.cs

示例2: GenerateUserIdentityAsync

 public static async Task<ClaimsIdentity> GenerateUserIdentityAsync(this Participant usr,ApplicationUserManager manager, string authenticationType)
 {
     // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
     var userIdentity = await manager.CreateIdentityAsync(usr, authenticationType);
     // Add custom user claims here
     return userIdentity;
 }
开发者ID:mcshaz,项目名称:SimPlanner,代码行数:7,代码来源:IdentityModels.cs

示例3: GenerateUserIdentityAsync

 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager manager)
 {
     // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
     var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
     // Add custom user claims here
     return userIdentity;
 }
开发者ID:CyberLeito,项目名称:MVC_Travel,代码行数:7,代码来源:IdentityModels.cs

示例4: GenerateUserIdentityAsync

        public async Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager manager, string authType)
        {
            var userIdentity = await manager.CreateIdentityAsync(this, authType);

            // Add custom user claims here

            return userIdentity;
        }
开发者ID:pplavetzki,项目名称:LanguageExchange,代码行数:8,代码来源:ApplicationUser.cs

示例5: GenerateUserIdentityAsync

 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager userManager,
     string authenticationType)
 {
     var userIdentity = await userManager.CreateIdentityAsync(this, authenticationType);
     return userIdentity;
 }
开发者ID:Buccaneer,项目名称:3d-mobi-05-eva-rest-back-end,代码行数:6,代码来源:ApplicationUser.cs

示例6: GenerateUserIdentityAsync

 public Task<ClaimsIdentity> GenerateUserIdentityAsync(ApplicationUserManager manager, User user)
 {
     return manager.CreateIdentityAsync(user, "UPlayAgainAuth");
 }
开发者ID:pandazzurro,项目名称:uPlayAgain,代码行数:4,代码来源:User.cs


注:本文中的ApplicationUserManager.CreateIdentityAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。