[pylons-discuss] Re: remote_user

2016-07-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/06/2016 01:05 PM, Michael Merickel wrote:
> REMOTE_USER is a special variable with a specific meaning. It's not
> some generic variable for identifying your user unless you have taken
> steps to have REMOTE_USER set. It is a way for a webserver upstream of
> you to identify the credentials and pass them down to your app in a
> secure way.
> 
> Anyway, so far it sounds like you didn't know what REMOTE_USER was
> and there's my brief explanation. You'll have to give more info about
> your setup and explain why exactly you expect it to not be None.

Perhaps the OP needs 'request.authenticated_userid'?

http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#p
yramid.request.Request.authenticated_userid


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJXfT09AAoJEPKpaDSJE9HYbKUQAMOayiy+WyU4rkyHvxlU51zc
na5o0PK0HZM6Jsq4fZ36+aNGqWmYrxMIY3c3ASyDtA2XAuUI9QkWszcwz/0c4dZ8
V9P/mr5rmFSswp047HeiT1FaCzWOk2OnDDjTaJ7OQ0NpuVok6E0xHrwlxuKEuNyv
q/BHoC5AH0vY9u4FwVR2Dhb2q/acnMET7Bp4/kz232HomP6AT1/eEnb+5i/hfkA8
ATCXBYxs7SdKwF9SgVVBR0h8WqwbMHIpRZ/+kNxiN86skF7eRdmgmXWBsFsuLUWO
I4yNSEpFA2MwleBvmn778L+XqQjAq8zUu0uTGDr9iYfJ76YaQHuDO548yJnFTQwc
IgFI1VOQMXWv7RCd0lj/xMn5oIuJdGwNNSf7T8XbPm/HpwmO1Ah/y6JZ9KtewdK+
r4vKm6OgN3c4tXqJuuBFh49OK+UotXNNh+89KGkuq9ikj14i4lTHROaJ+vRnFeBg
v+PKIIUk5SRPoc00+2jiN5P1gMhxGAgQbol9HUmBn0CNHuRE2vyA8Ff8VRT+3t/r
Wxem2bAw53yyt3Z9h4Nw6d2BoUZsodzQW/T7gajOaQVrsmPvzoP0qI/+lI9QOdSQ
VGy13V6hPqaXMfht2aNzPuSuhAjQLGS8CErmEKR176pQdL1b5ZomaJncyPz7vJvG
F0WmWmF9EPU6R58o2piV
=uvml
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/nljeg3%24fni%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [pylons-discuss] remote_user

2016-07-06 Thread Michael Merickel
REMOTE_USER is a special variable with a specific meaning. It's not some
generic variable for identifying your user unless you have taken steps to
have REMOTE_USER set. It is a way for a webserver upstream of you to
identify the credentials and pass them down to your app in a secure way.

Anyway, so far it sounds like you didn't know what REMOTE_USER was and
there's my brief explanation. You'll have to give more info about your
setup and explain why exactly you expect it to not be None.

On Wed, Jul 6, 2016 at 8:30 AM,  wrote:

> Hello,
> I try to use get the request.remote_user method in an existing pyramid
> project.
>
> What I tried is this:
>logging.error(request.remote_user)
> logging.error(request.environ.get('REMOTE_USER'))
> logging.error(type(request))
>
> With this results:
>
> *2016-07-05 18:08:36,335 ERROR [root][DummyThread-19] None*
>
> *2016-07-05 18:08:36,335 ERROR [root][DummyThread-19] None*
>
> *2016-07-05 18:08:36,336 ERROR [root][DummyThread-19]  'pyramid.request.Request'>*
>
>
>
> *but when I just call *
>
> *logging.error(request)*
>
> *I see that the username is part of the response, so it just seems that my
> methods to get the value is wrong*
>
>
>
> *any ideas how to solve or good examples to do it right?*
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/7d7d20bf-9bb4-4dfd-8afc-5d1c08fbf573%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwFumLViRbJBnbM1ZAC_n6SuzccMJo7o_b%3Dw4W71xBBiog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[pylons-discuss] remote_user

2016-07-06 Thread themad370
Hello,
I try to use get the request.remote_user method in an existing pyramid 
project.

What I tried is this:
   logging.error(request.remote_user)
logging.error(request.environ.get('REMOTE_USER'))
logging.error(type(request))
 
With this results:

*2016-07-05 18:08:36,335 ERROR [root][DummyThread-19] None*

*2016-07-05 18:08:36,335 ERROR [root][DummyThread-19] None*

*2016-07-05 18:08:36,336 ERROR [root][DummyThread-19] *



*but when I just call *

*logging.error(request)*

*I see that the username is part of the response, so it just seems that my 
methods to get the value is wrong*



*any ideas how to solve or good examples to do it right?*

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/7d7d20bf-9bb4-4dfd-8afc-5d1c08fbf573%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.