コード例 #1
0
        /// <summary>
        /// constructor takes the SAFIdentity as its parameter.
        /// </summary>
        /// <param name="sid">SAFIdentity object which contain the identity and appplication name information</param>
        public SAFPrincipal(SAFIdentity sid)
        {
            //retrieve the authentication configuraiton from the configuraiton file
            ConfigurationManager        cm = (ConfigurationManager)ConfigurationSettings.GetConfig("Framework");
            AuthenticationConfiguration ac = cm.AuthenticationConfig;

            //set identity object and the SAFUser property
            identity = sid;
            safUser  = ac.GetSAFUserName(sid.Name, sid.ApplicationName);
            //set the application inforamtion of the SAFPrincipal
            SetApplication(sid.ApplicationName);
        }