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.
2.5 KiB
2.5 KiB
LINGYUN.Abp.OpenIddict.AspNetCore
Introduction
LINGYUN.Abp.OpenIddict.AspNetCore is an ASP.NET Core integration module based on ABP OpenIddict, providing user information extensions and avatar URL claim support.
Features
-
Extended UserInfo Endpoint
- Support for returning user avatar URL
- Extended standard OpenID Connect claims
- Multi-tenancy support
-
Avatar URL Claims Contributor
- Automatically add user avatar URL claim
- Integration with identity system
-
OpenIddict Server Configuration
- Pre-configured avatar URL claim support
- Inherits from Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule
Installation
dotnet add package LINGYUN.Abp.OpenIddict.AspNetCore
Usage
-
Add
[DependsOn(typeof(AbpOpenIddictAspNetCoreModule))]to your module class. -
The UserInfo endpoint will automatically be extended to include the following claims:
- sub (User ID)
- tenant_id (Tenant ID, if multi-tenancy is enabled)
- preferred_username (Username)
- family_name (Surname)
- given_name (Name)
- picture (Avatar URL)
- email_verified
- phone_number
- phone_number_verified
- role
-
The avatar URL claim will be automatically added to the user's identity claims.
Configuration
By default, the module is pre-configured with the required settings. If you need to customize the configuration, you can modify it in the module's PreConfigureServices method:
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<OpenIddictServerBuilder>(builder =>
{
// Custom configuration
builder.RegisterClaims(new[] { "your_custom_claim" });
});
}
Notes
- The avatar URL claim type is
IdentityConsts.ClaimType.Avatar.Name - The UserInfo endpoint requires corresponding scope permissions to return information:
- profile: Basic information and avatar
- email: Email-related information
- phone: Phone number-related information
- roles: User role information