首页 > 编程语言 >asp.net core identity tables

asp.net core identity tables

时间:2023-07-13 14:34:51浏览次数:35  
标签:tables asp dbo core role user table net SELECT

 

 

SELECT * FROM dbo.AspNetUsers --has data
SELECT * FROM dbo.AspNetUserLogins
SELECT * FROM dbo.AspNetUserRoles--has data
SELECT * FROM dbo.AspNetUserTokens
SELECT * FROM dbo.AspNetUserClaims


SELECT * FROM dbo.AspNetRoles --has data
SELECT * FROM dbo.AspNetRoleClaims

It appears that when you create a new user using ASP.NET Core Identity, only the AspNetUsers, AspNetUserLogins, and AspNetUserRoles tables have data, while the AspNetUserTokens and AspNetUserClaims tables are empty.

This behavior is expected. Let's briefly explain the purpose of each table:

  1. AspNetUsers: This table stores information about the registered users, such as their user ID, username, email, password hash, and other user-specific properties.

  2. AspNetUserLogins: This table is used to store external login information for users who choose to authenticate using external providers (e.g., Google, Facebook). It keeps track of the linked login provider and the user's unique identifier for that provider.

  3. AspNetUserRoles: This table associates users with roles. It stores the user ID and role ID for each user-role relationship, allowing for role-based authorization.

  4. AspNetUserTokens: This table is used to store authentication tokens for users. These tokens are primarily utilized for features like password reset and email confirmation. Tokens are generated and stored in this table for each user.

  5. AspNetUserClaims: This table stores claims associated with each user. Claims represent specific pieces of information about the user (e.g., name, email, role) and are used for authorization purposes.

The AspNetRoles and AspNetRoleClaims tables you mentioned are separate from the user-related tables and are related to role management:

  1. AspNetRoles: This table stores information about the available roles in your application. Each role has a unique ID and a name.

  2. AspNetRoleClaims: This table stores claims associated with each role. Role claims represent specific pieces of information associated with a role (e.g., permissions, policies).

If you are not seeing data in the AspNetUserTokens and AspNetUserClaims tables, it might indicate that no tokens or additional claims have been generated or associated with the users at the moment.

Remember that data in these tables will be populated as you perform specific actions such as generating tokens, associating claims with users, or using external login providers.

Please note that this is a general explanation, and the actual behavior and table structures may vary based on your specific implementation and any customizations you have made.

 

 

 

标签:tables,asp,dbo,core,role,user,table,net,SELECT
From: https://www.cnblogs.com/chucklu/p/17550368.html

相关文章

  • Asp.net core中的配置提供程序和读取
    ASP.NETCore中的应用程序配置是使用一个或多个配置提供程序执行的。配置提供程序使用各种配置源从键值对读取配置数据:设置文件,例如appsettings.json环境变量AzureKeyVaultAzure应用程序配置命令行参数已安装或已创建的自定义提供程序目录文件内存中的.NET对象......
  • net面试题
    1.什么是扩展方法扩展方法使你能够向现有类型"添加"方法,无需修改类型。条件:按扩展方法必须满足的条件,1必须是静态类中的静态方法,2.第一个参数类型是要扩展的类型,并且需要添加this关键字以表示其扩展方法。2.const和readonly的区别都标识一个常量。区别:初始化位置不同,con......
  • 记一次 .NET 某游戏服务后端 内存暴涨分析
    一:背景1.讲故事前几天有位朋友找到我,说他们公司的后端服务内存暴涨,而且CPU的一个核也被打满,让我帮忙看下怎么回事,一般来说内存暴涨的问题都比较好解决,就让朋友抓一个dump丢过来,接下来我们用WinDbg一探究竟。二:WinDbg分析1.到底是谁在暴涨拿到dump之后,首先要判断是托......
  • ASP.NET Core 6框架揭秘实例演示[40]:基于角色的授权
    原文:https://www.cnblogs.com/artech/p/inside-asp-net-core-6-40.htmlASP.NET应用并没有对如何定义授权策略做硬性规定,所以我们完全根据用户具有的任意特性(如性别、年龄、学历、所在地区、宗教信仰、政治面貌等)来判断其是否具有获取目标资源或者执行目标操作的权限,但是针对角色......
  • kubernetes之 存储卷
    第八部分kubernetes之存储卷脱离节点而存在共享存储。存储卷不属于容器,他属于pod缓存,宿主机,不具备真正意义上存储,宿主机退役后,存储资源随之丢失,除非宿主机上也挂载独立的卷信息。容器真正意义上的存储卷类型emptyDir:pod删除,存储内容也删除,只能当临时存储空间或缓存使用,无真正意......
  • 网络net服务名配置
    网络net服务名配置oracle服务连接其他服务器上的oracle服务器需要配置net服务。如果需要连接169.254.10.121这台机器的oracle服务服务端需要确认的信息需要服务的端口号默认是1521需要让对方对1521这个端口进行放行,取消防火墙设置。要进行测试网络是否通畅ping......
  • net core-异步,同步理解
    并发: 一个车间只有一台机器,所有的工人都需要完成相同的工作,谁先抢到这个机器谁先工作,其余人需要等待。并行: 一个车间有4台机器,有4个工人,四个工人分别使用四台机器,同时执行任务,不用等待其它工人任务执行完毕。单线程: 当有三件事要处理,乙需要在甲之后处理,同时丙需要在乙之......
  • .Net8的AOT引导程序BootStrap
    前言.Net8的本地预编机器码AOT,它几乎进行了100%的自举。微软为了摆脱C++的钳制,做了很多努力。也就是代码几乎是用C#重写,包括了虚拟机,GC,内存模型等等。而需要C++做的,也就仅仅是引导程序,本篇通过代码来看下这段至关重要的引导程序的运作模式。原文:.Net8的AOT引导程序BootStrap概......
  • ubuntu20使用iptables-persistent libfakeroot libxtables-dev netfilter-persistent
    实施防火墙是保护服务器安全的重要一步。其中很大一部分是决定将对您的网络实施流量限制的单个规则和策略。像iptables这样的防火墙还允许您对应用规则的结构框架有发言权。在本指南中,您将学习如何构建防火墙,作为更复杂规则集的基础。该防火墙将主要关注提供合理的默认值和建立......
  • [LeetCode] 2542. Maximum Subsequence Score
    Youaregiventwo 0-indexed integerarrays nums1 and nums2 ofequallength n andapositiveinteger k.Youmustchoosea subsequence ofindicesfrom nums1 oflength k.Forchosenindices i0, i1,..., ik-1,your score isdefinedas:Thes......