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.3 KiB
2.3 KiB
LINGYUN.Abp.IdentityServer.Portal
IdentityServer portal authentication module that provides enterprise portal authentication functionality.
Features
-
Portal Authentication
PortalGrantValidator- Portal Grant Validator- Supports enterprise portal login
- Supports multi-tenant authentication
- Automatic tenant switching
- Enterprise information validation
- User password validation
- Security log recording
-
Authentication Flow
- User initiates login request using portal
- Check if enterprise identifier (EnterpriseId) is provided
- Without EnterpriseId: Returns list of enterprises with tenant information
- With EnterpriseId: Retrieves associated tenant information and switches to specified tenant
- Performs login validation using password method
- Returns token upon successful login
Module Reference
[DependsOn(
typeof(AbpIdentityServerPortalModule)
)]
public class YourModule : AbpModule
{
// ...
}
Dependencies
AbpIdentityServerDomainModule- ABP IdentityServer Domain ModuleAbpAspNetCoreMultiTenancyModule- ABP Multi-tenancy ModulePlatformDomainModule- Platform Domain Module
Configuration and Usage
Configure Portal Authentication
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IIdentityServerBuilder>(builder =>
{
builder.AddExtensionGrantValidator<PortalGrantValidator>();
});
}
Authentication Request Parameters
grant_type: "portal" (required)enterpriseId: Enterprise identifier (optional)username: Username (required)password: Password (required)scope: Request scope (optional)
Authentication Response
- When enterpriseId is not provided:
{
"error": "invalid_grant",
"enterprises": [
{
"id": "enterprise_id",
"name": "enterprise_name",
"code": "enterprise_code"
}
]
}
- On successful authentication:
{
"access_token": "access_token",
"expires_in": expiration_time,
"token_type": "Bearer",
"refresh_token": "refresh_token"
}
Related Documentation: