我使用身份服务器登录项目。我想保存用户令牌。我用来捕获IEventSink接口的令牌。此接口提供令牌(TokenIssuedSuccessEvent),但此令牌仅包含最后4个字符。如何获取完整令牌?
Windows 10,.net core 2.2.3,身份服务器4
if (evt is TokenIssuedSuccessEvent tokenIssuedSuccessEvent)
{
Guid userId = new Guid(tokenIssuedSuccessEvent.SubjectId);
string accessToken = string.Empty;
foreach (var token in tokenIssuedSuccessEvent.Tokens)
{
accessToken = token.TokenValue;
}
}
accessToken = token.TokenValue; // accessToken token result is ****i9wQ