Esempio n. 1
0
        public BooleanResult AuthenticatedUserGateway(SessionProperties properties)
        {
            // this method shall perform some other tasks ...

            UserInformation userInfo = properties.GetTrackedSingle <UserInformation>();

            UInfo uinfo = HttpAccessor.getUserInfo(userInfo.Username);

            if (uinfo != null)
            {
                m_logger.DebugFormat("AuthenticatedUserGateway: Uinfo: {0}", uinfo.ToString());
                foreach (string group in uinfo.groups)
                {
                    userInfo.AddGroup(new GroupInformation()
                    {
                        Name = group
                    });
                }
                properties.AddTrackedSingle <UserInformation>(userInfo);

                // and what else ??? :)
            }

            return(new BooleanResult()
            {
                Success = true
            });
        }
Esempio n. 2
0
        public BooleanResult AuthenticateUser(SessionProperties properties)
        {
            // this method shall say if our credentials are valid
            UserInformation userInfo = properties.GetTrackedSingle <UserInformation>();

            return(HttpAccessor.getResponse(userInfo));
        }