# Http://user:pass@some.url.com =\> how to access user, pass

**URL:** <https://www.ruby-forum.com/t/http-user-pass-some-url-com-how-to-access-user-pass/136444>\
**Category:** Rails\
**Created:** [May 2, 2008, 6:25am UTC](https://www.ruby-forum.com/t/http-user-pass-some-url-com-how-to-access-user-pass/136444 "2008-05-02T06:25:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8e7dd6/32.png) [@Kip](https://www.ruby-forum.com/u/Kip)\
**Post date:** [May 2, 2008, 6:25am UTC](https://www.ruby-forum.com/t/http-user-pass-some-url-com-how-to-access-user-pass/136444/1 "2008-05-02T06:25:03Z")

</div>

If I send a URL to Rails (via Mongrel in development mode) that  
includes the user:password credentials in the URL then I notice the  
URL helpers all produce URLs that include the credentials. However I  
cannot find a way to access to credentials myself in a controller  
method.

The plan is (eventually over SSL) to be able to submit login  
credentials in the URL. If authenticated then the Session will be  
used to keep the credentials for the users session. Therefore:

1. How can I get access to the user:password in the originating URL  
(nothing in request.env appears to provide it, yet the url helpers all  
represent it).

2. Then I want to tell the url\_helpers to not use the user:pass so it  
doesn’t appear in the request any more.

Any ideas out there?

Cheers, --Kip
