-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(claims): map abp claim types to jwt
- Loading branch information
Showing
43 changed files
with
587 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ name: "Build" | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- "**.cs" | ||
- "**.csproj" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
aspnet-core/framework/security/LINGYUN.Abp.Security/LINGYUN.Abp.Security.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="..\..\..\configureawait.props" /> | ||
<Import Project="..\..\..\common.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RootNamespace /> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Volo.Abp.Security" Version="$(VoloAbpPackageVersion)" /> | ||
<PackageReference Include="IdentityModel" Version="$(IdentityModelPackageVersion)" /> | ||
</ItemGroup> | ||
|
||
</Project> |
20 changes: 20 additions & 0 deletions
20
.../framework/security/LINGYUN.Abp.Security/Volo/Abp/Security/Claims/JwtClaimTypesMapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using IdentityModel; | ||
|
||
namespace Volo.Abp.Security.Claims; | ||
|
||
public static class JwtClaimTypesMapping | ||
{ | ||
public static void MapAbpClaimTypes() | ||
{ | ||
AbpClaimTypes.UserId = JwtClaimTypes.Subject; | ||
AbpClaimTypes.Role = JwtClaimTypes.Role; | ||
AbpClaimTypes.UserName = JwtClaimTypes.PreferredUserName; | ||
AbpClaimTypes.Name = JwtClaimTypes.GivenName; | ||
AbpClaimTypes.SurName = JwtClaimTypes.FamilyName; | ||
AbpClaimTypes.PhoneNumber = JwtClaimTypes.PhoneNumber; | ||
AbpClaimTypes.PhoneNumberVerified = JwtClaimTypes.PhoneNumberVerified; | ||
AbpClaimTypes.Email = JwtClaimTypes.Email; | ||
AbpClaimTypes.EmailVerified = JwtClaimTypes.EmailVerified; | ||
AbpClaimTypes.ClientId = JwtClaimTypes.ClientId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"version": "7.3.2", | ||
"version": "8.1.0", | ||
"name": "my-app-auth-server", | ||
"private": true, | ||
"dependencies": { | ||
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "2.3.3" | ||
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "3.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.