Exemple #1
0
        private void LogCurrentAuthenticationMethod()
        {
            if (Logger.IsDebug)
            {
                TokenAuthMethod method = GetTokenAuthMethod();
                string          authMethodDescription;
                switch (method)
                {
                case TokenAuthMethod.None:
                    authMethodDescription = "None, no authentication parameters";
                    break;

                case TokenAuthMethod.Callback:
                    authMethodDescription = "Token auth with callback";
                    break;

                case TokenAuthMethod.Url:
                    authMethodDescription = "Token auth with URL";
                    break;

                case TokenAuthMethod.Signing:
                    authMethodDescription = "Token auth with client-side signing";
                    break;

                case TokenAuthMethod.JustToken:
                    authMethodDescription = "Token auth with supplied token only";
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }

                Logger.Debug("Authentication method: {0}", authMethodDescription);
            }
        }
Exemple #2
0
 private void LogCurrentAuthenticationMethod()
 {
     if (Logger.IsDebug)
     {
         TokenAuthMethod method = GetTokenAuthMethod();
         Logger.Debug("Authentication method: {0}", method.ToEnumDescription());
     }
 }