Example #1
0
        public override SignInIdP_Resp_SignInRP_Req SignInIdP(SignInIdP_Req req1)
        {
            AuthenticationRequest req = (AuthenticationRequest)req1;

            Contract.Assume(GlobalObjects_base.SignInIdP_Req.IdPSessionSecret == req.IdPSessionSecret);

            if (req == null)
            {
                return(null);
            }
            ID_Claim _ID_Claim = Process_SignInIdP_req(req);

            if (_ID_Claim == null)
            {
                return(null);
            }

            AuthenticationResponse resp = (AuthenticationResponse)Redir(_ID_Claim.Redir_dest, _ID_Claim);

            resp.realm    = req.realm;
            resp.identity = req.identity;
            resp.ns       = req.ns;
            resp.mode     = req.mode;

            CST_Ops.recordme(this, req, resp, true, false);

            return(resp);
        }
Example #2
0
            public bool setEntry(string IdPSessionSecret, string client_id, ID_Claim Entry)
            {
                IDAssertionEntry IDAssertionEntry = new IDAssertionEntry();

                IDAssertionEntry.openid_claimed_id      = ((IDAssertionEntry)Entry).openid_claimed_id;
                IDAssertionEntry.openid_return_to       = ((IDAssertionEntry)Entry).openid_return_to;
                Dictionary[IdPSessionSecret][client_id] = IDAssertionEntry;

                return(true);
            }
Example #3
0
            public bool setEntry(string IdPSessionSecret, string client_id, ID_Claim Entry)
            {
                AuthorizationCodeEntry AuthorizationCodeEntry = (AuthorizationCodeEntry)Entry;

                if (AuthorizationCodeEntry == null)
                {
                    return(false);
                }
                Dictionary[IdPSessionSecret]            = new Dictionary <string, AuthorizationCodeEntry>();
                Dictionary[IdPSessionSecret][client_id] = AuthorizationCodeEntry;
                return(true);
            }
Example #4
0
        public override SignInIdP_Resp_SignInRP_Req Redir(string dest, ID_Claim _ID_Claim)
        {
            var AuthCode = _ID_Claim as AuthorizationCodeEntry;

            if (AuthCode == null)
            {
                return(null);
            }
            AuthorizationResponse resp = new AuthorizationResponse();

            resp.code = AuthCode.code;
            return(resp);
        }
Example #5
0
        public override SignInIdP_Resp_SignInRP_Req Redir(string dest, ID_Claim _ID_Claim)
        {
            AuthenticationResponse req = new AuthenticationResponse();

            req.claimed_id = _ID_Claim.UserID;
            req.return_to  = _ID_Claim.Redir_dest;

            /*
             * Redir should happen here.
             */

            return(req);
        }
        public override SignInIdP_Resp_SignInRP_Req Redir(string dest, ID_Claim claim)
        {
            var AuthCode = claim as AuthorizationCodeEntry;

            if (AuthCode == null)
            {
                return(null);
            }
            AuthenticationResponse resp = new AuthenticationResponse();

            resp.code = AuthCode.code;
            HTTP.HTTPComm.HttpPost(dest, "code=" + resp.code);
            return(resp);
        }