Authlogic

29 views
Skip to first unread message

Shak

unread,
Jun 9, 2010, 7:02:45 AM6/9/10
to OAuth Ruby
Hi all,

Looking at http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider,
it seems that the Ruby OAuth GEM requires use of
acts_as_authenticated, restful_authentication or
restful_openid_authentication.

However I use Authlogic to provide authentication. Is it possible for
Ruby OAuth to work in conjunction with Authlogic?

Shak

Tom Brown

unread,
Jun 9, 2010, 2:26:43 PM6/9/10
to oauth...@googlegroups.com
yes. i recently moved an open source app over from restful authentication to authlogic and it didn't break the oauth functionality.

cheers,
tom


--
You received this message because you are subscribed to the Google Groups "OAuth Ruby" group.
To post to this group, send email to oauth...@googlegroups.com.
To unsubscribe from this group, send email to oauth-ruby+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/oauth-ruby?hl=en.


Shak

unread,
Jun 11, 2010, 3:01:18 PM6/11/10
to OAuth Ruby
Would it be possible to list what needs to be implemented to get this
to work? The comments of the article at
http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider
seem to imply that logged_in?, current_user and authorize? need to be
implemented, but I'm still getting a

undefined method `login_required' for #<OauthClientsController:
0x852d2e0>

thrown. Is this a filter available with restful_auth?

On Jun 9, 7:26 pm, Tom Brown <herestomwiththeweat...@gmail.com> wrote:
> yes. i recently moved an open source app over from restful authentication to
> authlogic and it didn't break the oauth functionality.
>
> cheers,
> tom
>
> On Wed, Jun 9, 2010 at 6:02 AM, Shak <ssha...@gmail.com> wrote:
> > Hi all,
>
> > Looking at
> >http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-s...
> > ,
> > it seems that the Ruby OAuth GEM requires use of
> > acts_as_authenticated, restful_authentication or
> > restful_openid_authentication.
>
> > However I use Authlogic to provide authentication. Is it possible for
> > Ruby OAuth to work in conjunction with Authlogic?
>
> > Shak
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "OAuth Ruby" group.
> > To post to this group, send email to oauth...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > oauth-ruby+...@googlegroups.com<oauth-ruby%2Bunsu...@googlegroups.com>
> > .

Tom Brown

unread,
Jun 11, 2010, 4:26:59 PM6/11/10
to oauth...@googlegroups.com
using Person instead of User, here's what i have for login_required and a link to my first commit when i switched to authlogic:

    def login_required
      unless current_person
        store_location
        flash[:notice] = "You must be logged in to view the page"
        redirect_to login_url
        return false
      end
    end

http://github.com/austintimeexchange/oscurrency/commit/88c6521135bce3c44079a3970df0d0071aa5fb58

cheers,
tom

To unsubscribe from this group, send email to oauth-ruby+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages