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, <[email protected]> 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] <class
> '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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/7d7d20bf-9bb4-4dfd-8afc-5d1c08fbf573%40googlegroups.com
> <https://groups.google.com/d/msgid/pylons-discuss/7d7d20bf-9bb4-4dfd-8afc-5d1c08fbf573%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to