コード例 #1
0
ファイル: Plugin.cs プロジェクト: zhiqian1027/pgina
        /// <summary>
        /// Stores a copy of user's login and password in SessionProperties.properties
        /// so that we will still have access to them after Single User plugin (if used)
        /// </summary>
        public BooleanResult AuthenticatedUserGateway(Shared.Types.SessionProperties properties)
        {
            pluginImpl_logger.DebugFormat("Authenticated User Gateway.");
            Shared.Types.UserInformation userInfo = properties.GetTrackedSingle <Shared.Types.UserInformation>();
            properties.AddTracked("UserLogin", userInfo.Username);
            properties.AddTracked("UserPassword", userInfo.Password);
            pluginImpl_logger.DebugFormat("Login copy & password copy successfully stored in SessionProperties.properties.");

            return(new BooleanResult {
                Success = true, Message = "Login & password successfully stored in properties."
            });
        }