protected string GetUid(string sSignedChallenge)
    {
        // Get a reference to the LA server module object from session state.
        ServerLA.ServerLA objLAServer = (ServerLA.ServerLA)Session["LAServerModule"];

        // Pass the signed challenge to the LA server module's GetUID() method.
        string sUid = objLAServer.GetUID(sSignedChallenge);

        // Check that a UID was returned.
        if ((sUid == null) || (sUid.Length == 0))
        {
            // No UID was returned by the local authenticator - log this to the trace log.
            if (Fujitsu.SamlBridge.Trace.s_trswSamlBridgePath.TraceInfo)
            {
                Fujitsu.SamlBridge.Trace.WriteLine(
                    this, Constants.TRCE_NO_UID_OBTAINED_FROM_LOCAL_AUTHENTICATOR);
            }

            // Get the error code and last error string from the local authenticator.
            int    iLaError = objLAServer.LastError;
            string sLaError = objLAServer.LastErrorString;

            // Raise a SamlBridge error.
            string sAdditionalInfo =
                "IP address: " + Request.UserHostAddress +
                Environment.NewLine + "LASM error code: " + iLaError.ToString() +
                Environment.NewLine + "LASM error text: " + sLaError;

            ReportError(SamlBridgeErrorCode.SamlBridgeNoUid, sAdditionalInfo);
            return(string.Empty);
        }

        // A UID was returned, so pass it back to the caller.
        return(sUid);
    }
    protected string GetChallenge()
    {
        // Get a reference to the LA server module object from session state.
        ServerLA.ServerLA objLAServer = (ServerLA.ServerLA)Session["LAServerModule"];

        // Call the ServerLA object's GetChallenge() method to get a challenge string.
        string sChallenge = objLAServer.GetChallenge();

        if ((sChallenge == null || sChallenge.Length == 0))
        {
            // No challenge was obtained - log this to the trace log.
            if (Fujitsu.SamlBridge.Trace.s_trswSamlBridgePath.TraceError)
            {
                Fujitsu.SamlBridge.Trace.WriteLine(
                    this, Constants.TRCE_NO_CHALLENGE_OBTAINED_FROM_LOCAL_AUTHENTICATOR);
            }

            // Raise a SamlBridge error.
            ReportError(
                SamlBridgeErrorCode.SamlBridgeNoChallenge,
                "IP address: " + Request.UserHostAddress);

            return(string.Empty);
        }

        // A challenge was obtained, so return it.
        return(sChallenge);
    }