You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/Identity | 2 years ago | |
| FodyWeavers.xml | 4 years ago | |
| FodyWeavers.xsd | 4 years ago | |
| LINGYUN.Abp.Identity.HttpApi.csproj | 1 year ago | |
| README.EN.md | 1 year ago | |
| README.md | 1 year ago | |
README.md
LINGYUN.Abp.Identity.HttpApi
身份认证HTTP API模块,提供身份认证相关的HTTP API接口。
功能特性
- 扩展Volo.Abp.Identity.AbpIdentityHttpApiModule模块
- 提供身份认证相关的HTTP API接口
- 支持本地化资源的MVC数据注解
- 自动注册MVC应用程序部件
模块引用
[DependsOn(
typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityApplicationContractsModule))]
public class YouProjectModule : AbpModule
{
// other
}
API控制器
- IdentityUserController - 用户管理API
- IdentityRoleController - 角色管理API
- IdentityClaimTypeController - 声明类型管理API
- IdentitySecurityLogController - 安全日志API
- IdentitySettingsController - 身份认证设置API
- ProfileController - 用户配置文件API
API路由
/api/identity/users- 用户管理API路由/api/identity/roles- 角色管理API路由/api/identity/claim-types- 声明类型管理API路由/api/identity/security-logs- 安全日志API路由/api/identity/settings- 身份认证设置API路由/api/identity/my-profile- 用户配置文件API路由
基本用法
- 配置本地化
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(typeof(IdentityResource), typeof(AbpIdentityApplicationContractsModule).Assembly);
});
}
- 使用API
// 获取用户列表
GET /api/identity/users
// 获取指定用户
GET /api/identity/users/{id}
// 创建用户
POST /api/identity/users
{
"userName": "admin",
"email": "admin@abp.io",
"password": "1q2w3E*"
}
// 更新用户
PUT /api/identity/users/{id}
{
"userName": "admin",
"email": "admin@abp.io"
}
// 删除用户
DELETE /api/identity/users/{id}