Google Groups Home
Help | Sign in
GET / POST
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Singpolyma  
View profile
 More options May 17, 10:16 am
From: Singpolyma <singpol...@gmail.com>
Date: Sat, 17 May 2008 07:16:50 -0700 (PDT)
Local: Sat, May 17 2008 10:16 am
Subject: GET / POST
I'm hacking at getting OAuth to work with AtomPub and can't get over a
snag : to add posts with AtomPub one must POST raw XML - which means
the query-varsPOST version of OAuth is out.  It is a POST request, so
the query-varsGET method is out, and I'm on shared hosting (read: php
as CGI) so Authorization headers are out.  What I'm wondering is if
there isn't some way to put the OAuth data in the GET string on a POST
request and not break the spec?  Making the code support it would be
trivial.

Thoughts?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Eaton  
View profile
 More options May 17, 12:02 pm
From: "Brian Eaton" <bea...@google.com>
Date: Sat, 17 May 2008 09:02:10 -0700
Local: Sat, May 17 2008 12:02 pm
Subject: Re: [oauth] GET / POST

On Sat, May 17, 2008 at 7:16 AM, Singpolyma <singpol...@gmail.com> wrote:
> I'm hacking at getting OAuth to work with AtomPub and can't get over a
> snag : to add posts with AtomPub one must POST raw XML - which means
> the query-varsPOST version of OAuth is out.  It is a POST request, so
> the query-varsGET method is out, and I'm on shared hosting (read: php
> as CGI) so Authorization headers are out.  What I'm wondering is if
> there isn't some way to put the OAuth data in the GET string on a POST
> request and not break the spec?  Making the code support it would be
> trivial.

That sounds entirely reasonable to me.

Are you signing the raw XML body?  There's been some discussion about
various algorithms to do that, they all sound fine, we just need to
pick one.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Worrell  
View profile
 More options May 17, 12:13 pm
From: Marc Worrell <ma...@pobox.com>
Date: Sat, 17 May 2008 09:13:03 -0700 (PDT)
Local: Sat, May 17 2008 12:13 pm
Subject: Re: GET / POST
You can use the xoauth_body_signature_method.

See http://groups.google.com/group/oauth/msg/58a724ed2fd07ea8 for one
of the discussions.

We still need to formalise the method a bit, especially regarding the
inclusion of the content-type and some other headers.

I made an implementation of this in PHP (without the header signing,
as that is still in discussion).
You can check:

http://code.google.com/p/oauth-php/source/browse/trunk/library/OAuthR...

and

http://code.google.com/p/oauth-php/source/browse/trunk/library/OAuthR...

- Marc Worrell

On May 17, 6:02 pm, "Brian Eaton" <bea...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Worrell  
View profile
 More options May 17, 12:18 pm
From: Marc Worrell <ma...@pobox.com>
Date: Sat, 17 May 2008 09:18:14 -0700 (PDT)
Local: Sat, May 17 2008 12:18 pm
Subject: Re: GET / POST
Besides using the xoauth_body_signature method, the xoauth and oauth
vars can just be part of the query string.

From the OAuth spec:

5.2.  Consumer Request Parameters

OAuth Protocol Parameters are sent from the Consumer to the Service
Provider in one of three methods, in order of decreasing preference:

In the HTTP Authorization header as defined in OAuth HTTP
Authorization Scheme.
As the HTTP POST request body with a content-type of application/x-www-
form-urlencoded.
Added to the URLs in the query part (as defined by [RFC3986] section
3).

- Marc Worrell

On May 17, 4:16 pm, Singpolyma <singpol...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Singpolyma  
View profile
 More options May 17, 5:34 pm
From: Singpolyma <singpol...@gmail.com>
Date: Sat, 17 May 2008 14:34:57 -0700 (PDT)
Local: Sat, May 17 2008 5:34 pm
Subject: Re: GET / POST

On May 17, 12:18 pm, Marc Worrell <ma...@pobox.com> wrote:

> Besides using the xoauth_body_signature method, the xoauth and oauth
> vars can just be part of the query string.

This is what I want to do, but the spec seems to suggest that if
request type is POST that using the query string is not allowed?  I'm
not sure I understand the xoauth_body_signature method - where does
the data go ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc Worrell  
View profile
 More options May 17, 5:50 pm
From: Marc Worrell <ma...@pobox.com>
Date: Sat, 17 May 2008 14:50:31 -0700 (PDT)
Local: Sat, May 17 2008 5:50 pm
Subject: Re: GET / POST

On May 17, 11:34 pm, Singpolyma <singpol...@gmail.com> wrote:

> This is what I want to do, but the spec seems to suggest that if
> request type is POST that using the query string is not allowed?  I'm
> not sure I understand the xoauth_body_signature method - where does
> the data go ?

A lot of people would assume that you can't use the query string when
you are using POST (or PUT)
But that is not true, the query string is a valid part of the uri, and
as such you can always use it.

The xoauth_body_signature is the checksum of the http body being sent
(in your case the XML).
The xoauth_body_signature is handled just like the other oauth_xxxx,
add them together with the query/post variables and sign it the normal
way.

Make sure that the content-type is correctly set (in your case
application/xml) then it should work nicely.

- Marc


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google