详细的步骤是?
之后呢?
谢谢
如何在一个新的Blazor Server app 项目模版中复现问题? 步骤是?
What are the output logs of IntrospectAccessToken?
hi
Which version works for you?
MVC or BLazor Server
Thanks.
We will fix it in the next patch version
Your question ticket has been refunded.
Thanks.
hi
I will check it. Thanks.
hi
Can you use abp get-source Volo.Payment --version 9.2.0 command to download the full source code?
Thanks.
hi
You can create a new Application in the ABP OpenIDDict module page.
And then use it to get an access token
using IdentityModel.Client;
using System;
using System.Net.Http;
using System.Threading.Tasks;
public class Program
{
public static async Task Main(string[] args)
{
// 1. Create an HttpClient instance
var client = new HttpClient();
// Optional: Set a base address if all requests go to the same IdentityServer
// client.BaseAddress = new Uri("https://yoursolution1.com");
// 2. Discover the token endpoint (recommended)
// This dynamically finds the endpoint address from the discovery document
var disco = await client.GetDiscoveryDocumentAsync("https://yoursolution1.com");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
return;
}
// 3. Create the client credentials token request
var request = new ClientCredentialsTokenRequest
{
Address = disco.TokenEndpoint, // Use the discovered token endpoint
ClientId = "m2m", // Your client ID
ClientSecret = "secret", // Your client secret
Scope = "api" // The scope(s) you need access to
};
// 4. Send the request and await the response
var tokenResponse = await client.RequestClientCredentialsTokenAsync(request);
// 5. Check for errors and process the token
if (tokenResponse.IsError)
{
Console.WriteLine(tokenResponse.Error);
// Handle error, e.g., throw an exception or return
return;
}
Console.WriteLine("Token retrieved successfully:");
Console.WriteLine(tokenResponse.AccessToken);
}
}