Пример #1
0
        public string GenerateURL(AuthenticationResponse req)
        {
            StringBuilder sb = new StringBuilder(endpointUrl);

            sb.AppendFormat("?openid.claimed_id={0}&openid.identity={1}&openid.return_to={2}?SymT={6}&openid.realm={5}&openid.mode={3}&openid.ns={4}", HttpUtility.UrlEncode(req.claimed_id), HttpUtility.UrlEncode(req.identity), HttpUtility.UrlEncode(req.return_to), req.mode, HttpUtility.UrlEncode(req.ns), HttpUtility.UrlEncode(req.realm), HttpUtility.UrlEncode(req.SymT));

            return sb.ToString();
        }
        public AuthenticationRequest RequestAuthentication(AuthenticationResponse resp)
        {
            var req = new AuthenticationRequest();

            req.realm = this.Domain;
            req.identity = "http://specs.openid.net/auth/2.0/identifier_select";
            req.ns = "http://specs.openid.net/auth/2.0";
            req.claimed_id = "http://specs.openid.net/auth/2.0/identifier_select";
            req.mode = "checkid_setup";
            req.return_to = this.Domain;
            CST_Ops.recordme(this, resp, req);

            return req;
        }
Пример #3
0
        public override AuthenticationConclusion Process_SignInRP_req(AuthenticationResponse req)
        {
            if (this.Domain != req.return_to) return null;
            AuthenticationConclusion conclusion = new AuthenticationConclusion();

            conclusion.SessionUID = req.claimed_id;

            return conclusion;
        }
        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;
        }