OAuth access token contains user ID

已查看 187 次
跳至第一个未读帖子

Ollie

未读,
2009年4月7日 11:09:162009/4/7
收件人 Twitter Development Talk
I am just looking into OAuth for the first time as a way of allowing
users to login to http://twitterleague.com. All I store in my database
is a user ID. So the basic authentication was used to verify
credentials and get the user ID.

I was looking at the oauth access token and it appears to start with
the users ID then a "-" then the random characters. For instance:
1234567-FAfdsafnjdksahf8wei9qyh89fxwqihfd839q...

All I want to know is can I just grab the beginning of the string or
will the tokens format change? As it would save me using the
verifyCredentials method.

Thanks

Ollie

Burhan TANWEER

未读,
2009年4月7日 12:08:012009/4/7
收件人 twitter-deve...@googlegroups.com
Interesting, I would also like to know the answer
--
Sincerely,

Burhan Tanweer
www.explorewww.com
exp...@explorewww.com

Matt Sanford

未读,
2009年4月7日 12:46:212009/4/7
收件人 twitter-deve...@googlegroups.com
Hi there,

    We currently use that user id as a speed optimization and we have no plans to remove it. However, since it's purely an optimization we may change it at some point if we find something to make it faster still. One of my changes currently waiting to go out will add a user_id and screen_name to the oauth callback so you can get ahold of this information easier. You can use part of the token for now but I would recommend using the new parameters when they launch (hopefully this week, but fire fighting can blocks deploys).

Thanks;
  — Matt Sanford / @mzsanford

Ollie Parsley

未读,
2009年4月7日 14:51:122009/4/7
收件人 Twitter Development Talk
Thanks Matt.

Great idea to make it more effiecient.

Ollie

On Apr 7, 5:46 pm, Matt Sanford <m...@twitter.com> wrote:
> Hi there,
>
>      We currently use that user id as a speed optimization and we have  
> no plans to remove it. However, since it's purely an optimization we  
> may change it at some point if we find something to make it faster  
> still. One of my changes currently waiting to go out will add a  
> user_id and screen_name to the oauth callback so you can get ahold of  
> this information easier. You can use part of the token for now but I  
> would recommend using the new parameters when they launch (hopefully  
> this week, but fire fighting can blocks deploys).
>
> Thanks;
>    — Matt Sanford / @mzsanford
>
> On Apr 7, 2009, at 08:09 AM, Ollie wrote:
>
>
>
> > I am just looking into OAuth for the first time as a way of allowing
> > users to login tohttp://twitterleague.com. All I store in my database
回复全部
回复作者
转发
0 个新帖子