You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Prieß <ma...@googlemail.com> on 2011/02/21 14:42:14 UTC
[users@httpd] Set get parameter into http header.
Hi Apache users,
i like to do some basic authentication with a simple token which is
user:password via http get.
How can i get the token which come in via "http get" into the header with
Apache ?
Regards,
Michael
Re: [users@httpd] Set get parameter into http header.
Posted by Michael Prieß <ma...@googlemail.com>.
Hi,
i doesn't need features like Base64-decoding. I have a RewriteMap which
contain all the Basic64 authentifications tokens which are equal with the
token that come over the uri.
Need only a simple solution to pass them from the uri query into the http
header.
Regards,
Michael
Re: [users@httpd] Set get parameter into http header.
Posted by Nick Kew <ni...@webthing.com>.
On Mon, 21 Feb 2011 15:15:59 +0100
Michael Prieß <ma...@googlemail.com> wrote:
> Thanks for your fast response. Setting the header works already fine. But
> the real problem is how can i get the parameter from
> http://localhost:/?token=1337base64token
> into the header.
mod_headers won't do programmatic things like Base64-decoding for you.
And it's a mismatch for the authn framework. mod_rewrite could do
that for you, but that way madness lies (it would be harder work
than writing a new module).
mod_auth_form from Apache 2.3 and up gets authentication from
tokens like that. It might meet your needs.
--
Nick Kew
Available for work, contract or permanent.
http://www.webthing.com/~nick/cv.html
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Set get parameter into http header.
Posted by Michael Prieß <ma...@googlemail.com>.
Thanks for your fast response. Setting the header works already fine. But
the real problem is how can i get the parameter from
http://localhost:/?token=1337base64token
into the header.
My usecase is i have a service which run behind my Apache httpd in the
background that only support basic authentication and i have generated a
base64 token which equal user:password and now i like
to set them into the header. Hardcodet it works already. But how can i get
the param from the uri into the header ?
Regards,
Michael
2011/2/21 Björn Zettergren <bj...@basefarm.se>
> On 02/21/2011 02:42 PM, Michael Prieß wrote:
>
>> Hi Apache users,
>>
>> i like to do some basic authentication with a simple token which is
>> user:password via http get.
>>
>> How can i get the token which come in via "http get" into the header
>> with Apache ?
>>
>
> Try mod_headers: http://httpd.apache.org/docs/current/mod/mod_headers.html
>
> Although, not knowing what it is you wish to achieve in the end, i would
> suspect that there is better, existing, methods for doing authentication
> using for example mod_auth_basic:
> http://httpd.apache.org/docs/current/mod/mod_auth_basic.html
>
> /Björn
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Set get parameter into http header.
Posted by Björn Zettergren <bj...@basefarm.se>.
On 02/21/2011 02:42 PM, Michael Prieß wrote:
> Hi Apache users,
>
> i like to do some basic authentication with a simple token which is
> user:password via http get.
>
> How can i get the token which come in via "http get" into the header
> with Apache ?
Try mod_headers: http://httpd.apache.org/docs/current/mod/mod_headers.html
Although, not knowing what it is you wish to achieve in the end, i would
suspect that there is better, existing, methods for doing authentication
using for example mod_auth_basic:
http://httpd.apache.org/docs/current/mod/mod_auth_basic.html
/Björn
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org