Skip to content

Commit

Permalink
refactor: ClaimType ImpersonatorUserId
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Apr 9, 2024
1 parent 8407f7b commit d78b931
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ImpersonationGrantValidator : IExtensionGrantValidator
IAuthClient _authClient;
public string GrantType { get; } = BuildingBlocks.Authentication.OpenIdConnect.Models.Constans.GrantType.IMPERSONATION;

const string IMPERSONATOR_USER_ID = "http://Lonsid.org/identity/claims/impersonatorUserId";
const string IMPERSONATOR_USER_ID = "https://masastack.com/security/identity/claims/impersonatorUserId";

public ImpersonationGrantValidator(IAuthClient authClient)
{
Expand Down Expand Up @@ -55,6 +55,6 @@ public async Task ValidateAsync(ExtensionGrantValidationContext context)
claims.Add(new Claim(IMPERSONATOR_USER_ID, cacheItem.ImpersonatorUserId.ToString()));
}

context.Result = new GrantValidationResult(cacheItem.TargetUserId.ToString(), "impersonation");
context.Result = new GrantValidationResult(cacheItem.TargetUserId.ToString(), "impersonation", claims);
}
}

0 comments on commit d78b931

Please sign in to comment.