Re: [ruby-fs-stack] Unable to authenticate

27 views
Skip to first unread message

Scott Lloyd

unread,
Sep 28, 2010, 3:13:14 PM9/28/10
to ruby-f...@googlegroups.com

The identity/v1 module is no longer available. You will need to use the v2 module in order to authenticate.

On Sep 28, 2010 1:04 PM, "Snaga" <moul...@gmail.com> wrote:
> Just found the ruby fs stack gem a few days ago. I'm interested in
> playing around to see what it can do.
>
> I have a dev account, and can log in with my browser using the v2
> authorization url, but I cannot authenticate using the sample code and
> my credentials with v1 authentication. I also cannot login with my
> browser using the v1 url. In both cases, I receive a "Gone" message
> from the server.
>
> Just wondering if I am doing something wrong.
>
> Thanks. Excited to see such a well developed ruby interface into
> familysearch.

Jimmy Z

unread,
Sep 28, 2010, 3:19:15 PM9/28/10
to Ruby FS Stack
You should be able to use the identity-v1 in this gem until November.
I need to update the gem to use identity/v2, and I think I'll
automatically alias identity-v1 to use identity-v2 so that the code
change is easy.

However, if you are building a web app, you should be using OAuth. We
have an example of how to do this posted here:
https://devnet.familysearch.org/docs/api/Identity-v2/sample-code/ruby-sample-code/document_view

Can you post some code samples of what you are doing (don't post dev
key)? I'm guessing that it is a Communicator option that is either
missing or incorrectly set that is giving you this error. Also, you
can assign a logger to the Communicator so that you can view the calls
that are being made behind the scenes.

Thanks!

Jimmy


On Sep 28, 1:13 pm, Scott Lloyd <swl...@gmail.com> wrote:
> The identity/v1 module is no longer available. You will need to use the v2
> module in order to authenticate.

Snaga

unread,
Sep 28, 2010, 12:57:41 PM9/28/10
to Ruby FS Stack

Snaga

unread,
Sep 28, 2010, 4:16:05 PM9/28/10
to Ruby FS Stack
I'll give OAuth a try this evening, but here is the code from what I
was trying last night:

require 'rubygems'
require 'ruby-fs-stack'

require 'logger'
logger = Logger.new('fs_stack.log')

communicator = FsCommunicator.new :domain => 'http://
www.dev.usys.org',
:key => '<devkey>',
:user_agent => 'Ruby-Fs-Stack/v.1
(JimmyZimmerman) FsCommunicator/0.1 (Ruby)',
:logger => logger

communicator.identity_v1.authenticate :username =>
'<username>', :password => '<password>'

On Sep 28, 1:19 pm, Jimmy Z <jimmy.zimmer...@gmail.com> wrote:
> You should be able to use the identity-v1 in this gem until November.
> I need to update the gem to use identity/v2, and I think I'll
> automatically alias identity-v1 to use identity-v2 so that the code
> change is easy.
>
> However, if you are building a web app, you should be using OAuth. We
> have an example of how to do this posted here:https://devnet.familysearch.org/docs/api/Identity-v2/sample-code/ruby...

Jimmy Z

unread,
Sep 29, 2010, 12:42:12 AM9/29/10
to Ruby FS Stack
Nothing in the code seems to stand out. Doe you get a stack trace with
the error? Also, do you see any HTTP requests in the logs? Which
version of Ruby are you running?

--
Jimmy Z

On Sep 28, 2:16 pm, Snaga <moulto...@gmail.com> wrote:
> I'll give OAuth a try this evening, but here is the code from what I
> was trying last night:
>
> require 'rubygems'
> require 'ruby-fs-stack'
>
> require 'logger'
> logger = Logger.new('fs_stack.log')
>
> communicator = FsCommunicator.new :domain => 'http://www.dev.usys.org',

jimmy zimmerman

unread,
Sep 29, 2010, 6:17:34 PM9/29/10
to Ruby FS Stack
I just realized that identity/v1 is gone on the Reference System, where it isn't gone on Production. We need to update the gem to work with v2. The patch is quite simple, we should just need to change identity/v1 string to identity/v2 within the Identity Communicator.

Feel free to fork the Github project and make an update.

--
Jimmy
--
Jimmy Zimmerman
http://jimmyzimmerman.com

Jimmy Z

unread,
Oct 29, 2010, 6:07:30 PM10/29/10
to Ruby FS Stack
If you update your gem, the authentication should work now.

--
Jimmy
Reply all
Reply to author
Forward
0 new messages