Я не могу получить ответ авторизации ответа
Для своих тестов я использую консоль Visual Studio.
Я установил порт при прослушивании запуска программы
// create a redirect URI using an available port on the loopback address.
string redirectUri = string.Format("https://192.168.1.12:7890/");
Console.WriteLine("redirect URI: " + redirectUri);
// create an HttpListener to listen for requests on that redirect URI.
var http = new HttpListener();
http.Prefixes.Add(redirectUri);
Console.WriteLine("Listening..");
http.Start();
var options = new OidcClientOptions
{
Authority = "https://Authority.be/",
Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode,
ClientId = "password",
ResponseMode = OidcClientOptions.AuthorizeResponseMode.Redirect,
Scope = "openid profile",
RedirectUri = redirectUri,
ProviderInformation = new ProviderInformation
{
IssuerName = "https://Authority.be",
AuthorizeEndpoint = "https://Authority.be/oidc/authorization",
TokenEndpoint = "https://Authority.be/oidc/token",
KeySet = new JsonWebKeySet("{\"alg\":\"RS256\"}")
}
};
var client = new OidcClient(options);
var state = await client.PrepareLoginAsync();
Console.WriteLine($"Start URL: {state.StartUrl}");
// open system browser to start authentication
Process.Start(state.StartUrl);
// wait for the authorization response.
HttpListenerContext context = await http.GetContextAsync();
Я ничего не восстанавливаю в ==> контексте
Я не перехожу к следующей инструкции, почему?
В браузере:
https://192.168.1.12:7890/?code=9fsoqs9v1wze590mwoo104iwi1tf4vzbwckw&state=96bfb7608c4cb060f6d3c22186545cbd ==> Эта страница не может быть отображена
Вы можете мне помочь?
Заранее спасибо