Ejemplo n.º 1
0
        /// <summary>
        /// This method is used to Initiate SSO (considering as Audience URL)
        /// </summary>
        /// <param name="companyID">Current CompanyID to whom to initiate SSO.</param>
        /// <returns>returns True for Sucessfull and false for Failure</returns>
        internal bool InitiateSSO(CompanyIDList companyID)
        {
            bool IsSSOInitiated = true;

            try
            {
                _companyID = companyID.ToString();
                WriteToFileLog.Instance(_companyID).Write(WriteToFileLog.Instance(_companyID).Start);

                GetAuthnRequest();
                IDPUrl      = DS_AuthnRequest.Tables[_companyID].Rows[0]["IDPUrl"].ToString();
                SAMLRequest = CreateAuthnRequest();
            }
            catch (Exception exception)
            {
                IsSSOInitiated = false;
                WriteToFileLog.Instance(_companyID).Write("Error Occurred:-" + exception.Message.ToString() + "\n" + "Stack Trace:-" + exception.StackTrace.ToString());
            }
            finally
            {
                WriteToFileLog.Instance(_companyID).Write(WriteToFileLog.Instance(_companyID).End);
                WriteToFileLog.Instance(_companyID).Write("");
            }
            return(IsSSOInitiated);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method is to check whether the SSO is activated.
        /// </summary>
        /// <param name="companyIDList">Current CompanyName</param>
        /// <returns>True for Yes and False for No</returns>
        internal bool IsSSOActivated(CompanyIDList companyIDList)
        {
            bool IsSSOActivated = false;

            using (CompaniesSL objCompaniesSL = new CompaniesSL())
            {
                IsSSOActivated = objCompaniesSL.getSingleCompanies(InsiderTrading.Common.Common.getSystemConnectionString(), "Vigilante_" + companyIDList.ToString()).bIsSSOActivated;
            }

            return(IsSSOActivated);
        }