Microsoft.Identity.Client.Platforms.Shared.Desktop.OsBrowser.IUriInterceptor
interface IUriInterceptor
An abstraction over objects that are able to listen to localhost url (e.g. http://localhost:1234)
and to retrieve the authorization response via GET (query params) or POST (form data)
Task<AuthorizationResponse> ListenToSingleRequestAndRespondAsync(int port, string path, Func<AuthorizationResponse, MessageAndHttpCode> responseProducer, CancellationToken cancellationToken)
Listens to http://localhost:{port} and retrieve the authorization response.
For GET requests, the response is in query params. For POST (form_post), the response is in the body.
Then push back a response such as a display message or a redirect.