62,046
社区成员
发帖
与我相关
我的任务
分享
public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
{
var identity = new ClaimsIdentity(context.Options.AuthenticationType);
identity.AddClaim(new Claim(ClaimTypes.Name, context.UserName));
identity.AddClaim(new Claim("UUID", context.UUID));//这里我要怎么样才能让客户端传这个数据了?我用Postman测试加了参数UUID=xxx也没有办法获取到,只能用context.UserName获取到$UserName=xx
context.Validated(identity);
}