WSO2 Identity Server 5.7.0 Revoke Method doesn't work resulting in Error Code : 401 -> UnAuthorize.
this link says how to use the revoke method, and I want use this for c# code:
WebRequest request2 = WebRequest.Create("https://localhost:9443/oauth2/revoke?token=" + accessToken + "&token_type_hint=access_token");
request2.Method = "POST";
request2.PreAuthenticate = true;
request2.Credentials = CredentialCache.DefaultCredentials;
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
request2.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
request2.Headers.Add("Authorization", "Basic " + "YFnfIeUVkpW64sSysLgoqajioOIa" + ":" + "L7rtcwWDqAQ6NdsvY2ZqUTAi5wMa");
var response2 = request2.GetResponseAsync();
response2.Wait();
var t = response2.Result;