public override ProviderCredentials CreateCredentials(ClaimsIdentity claimsIdentity) { if (claimsIdentity == null) throw new ArgumentNullException("claimsIdentity"); string username = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier).Value; var credentials = new CustomLoginProviderCredentials { UserId = this.TokenHandler.CreateUserId(this.Name, username) }; return credentials; }
public override ProviderCredentials CreateCredentials(ClaimsIdentity claimsIdentity) { if (claimsIdentity == null) { throw new ArgumentNullException("claimsIdentity"); } string username = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier).Value; var credentials = new CustomLoginProviderCredentials { UserId = this.TokenHandler.CreateUserId(this.Name, username) }; return(credentials); }