이 질문이 How to authorize SignalR Core Hub method with JWT과 관련되어 있다고 가정 할 때 OpenIddict에서 발행 한 불투명 액세스 토큰을 해독하지 않는 것이 좋습니다.
// Resolve the data protection provider from the DI container.
// Depending on where this snippet is used, you must be able
// to directly use constructor injection (e.g in a controller).
var provider = app.ApplicationServices.GetRequiredService<IDataProtectionProvider>();
var protector = provider.CreateProtector(
nameof(OpenIdConnectServerHandler),
nameof(OpenIdConnectServerOptions.AccessTokenFormat),
OpenIdConnectServerDefaults.AuthenticationScheme);
var format = new TicketDataFormat(protector);
// If the access token is not malformed, a non-null value
// is returned. Note that you'll have to manually validate
// the expiration date and the audience of the ticket.
var ticket = format.Unprotect("your access token");
: 당신이 정말로 그것을 직접 수행 할 경우
, 당신은 수동으로 OpenIddict에서 사용하는 ASP.NET 코어 데이터 보호 "목적 문자열"와 TicketDataFormat
인스턴스를 인스턴스화 할 수 있습니다