How to debug/trace ADAL authentication?

后端 未结 3 809
-上瘾入骨i
-上瘾入骨i 2021-01-14 18:13

I was trying one of the Azure Active Directory samples Microsoft has published here: https://github.com/AzureADSamples/WebApp-WebAPI-OpenIDConnect-DotNet

I managed t

3条回答
  •  花落未央
    2021-01-14 18:27

    In ADAL v3, you create a class that implements IAdalLogCallback:

    public class AdalLoggerCallback : IAdalLogCallback
    {
      public void Log(LogLevel level, string message)
      {
        Console.Write(message);
      }
    }
    

    Then, set the Callback property of the static LoggerCallbackHandler object:

    LoggerCallbackHandler.Callback = new AdalLoggerCallback();
    

提交回复
热议问题