# ActiveResource - Authenticate dynamically?

**URL:** <https://www.ruby-forum.com/t/activeresource-authenticate-dynamically/141518>\
**Category:** Rails\
**Created:** [June 26, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/activeresource-authenticate-dynamically/141518 "2008-06-26T18:33:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [June 26, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/activeresource-authenticate-dynamically/141518/1 "2008-06-26T18:33:25Z")

</div>

Hi,

There doesn’t seem to be a lot of info about ActiveResource, and I have  
an issue which I think would be pretty common, but I haven’t found any  
info about.

Is there a convention to allow ActiveResource to authenticate using the  
current user logged in?

Obviously I can’t send the user’s password since it’s hashed, so I was  
thinking in using the user’s hash to create an encrypted key that can  
then be decrypted by the REST server. If you think this would be a good  
approach, are there any security implications I should worry about?

Also, I could use a specific admin user to authenticate and give the  
current user’s login as a param to AR’s calls, but that would involve  
more work since the REST server already filters results depending on the  
authenticated user, so it would have to also filter on the user passed  
on the params.

Thanks!

- Ivan V.
