Ejemplo n.º 1
0
        public override string marshalAuthorizationRequest(OAuth20.AuthorizationRequest authorizationRequest)
        {
            string req = AuthorizationEndpointUrl + "?" + Utils.ObjectToUrlEncodedString(authorizationRequest);

            //The next line is needed because Weibo app registration doesn't allow the hostname to be localhost, but 127.0.0.1
            req = req.Replace("%2F%2Flocalhost", "%2F%2F127.0.0.1");
            return(req);
        }
Ejemplo n.º 2
0
        // Very little of this is Weibo-specific.  Consider moving it to
        // OAuth20.  (Exception: it's unclear if the user profile request is an
        // OAuth20 concept at all, so maybe the entirety of that should move to
        // Weibo with only a hook remaining in OAuth20.)

        /*** implementing the methods for AuthorizationRequest ***/
        public override OAuth20.AuthorizationRequest createAuthorizationRequest(SVX.Channel client)
        {
            var authorizationRequest = new OAuth20.AuthorizationRequest();

            authorizationRequest.client_id     = client_id;
            authorizationRequest.response_type = "code";
            //authorizationRequest.scope = "user_about_me email";
            authorizationRequest.redirect_uri = redirect_uri;
            var stateParams = new OAuth20.StateParams
            {
                client       = client,
                idpPrincipal = idpParticipantId.principal
            };

            authorizationRequest.state = stateGenerator.Generate(stateParams, SVX_Principal);
            return(authorizationRequest);
        }
Ejemplo n.º 3
0
 public override string marshalAuthorizationRequest(OAuth20.AuthorizationRequest MSAuthenticationRequest)
 {
     return(AuthorizationEndpointUrl + "?" + Utils.ObjectToUrlEncodedString(MSAuthenticationRequest));
 }
Ejemplo n.º 4
0
        public override string marshalAuthorizationRequest(OAuth20.AuthorizationRequest authorizationRequest)
        {
            string req = AuthorizationEndpointUrl + "?" + Utils.ObjectToUrlEncodedString(authorizationRequest);

            return(req);
        }