Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-30 Thread Ryan Nowakowski
nts file for Django Microsoft Authentication Backend have > pyjwt [required: Any] Yuup! That kind of thing has bitten me more than once. I end up pinning the version of the dependency in requirements.txt to the one I know works. -- You received this message because you are subscribe

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-29 Thread Larry Martell
python packages but we did not - the new system had 2.0.1 version of pyjwt. When we downgraded to 1.7.1 it started working again. The requirements file for Django Microsoft Authentication Backend have pyjwt [required: Any] -- You received this message because you are subscribed to the Googl

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Ryan Nowakowski
On Sat, Jan 23, 2021 at 11:05:14AM -0800, Larry Martell wrote: > On Sat, Jan 23, 2021 at 8:14 AM Ryan Nowakowski wrote: > > > > A couple of places to look: > > > > 1. Different domains on the new boxes? You'll need to add the new callback > > urls on the Microsoft side. > > 2. Different version o

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Larry Martell
rsion of python and all python packages. There are some minor revision differences in a bunch of OS level packages. Could that be a factor? > > On January 22, 2021 2:51:30 PM CST, Larry Martell > wrote: >> >> I have an app deployed in many places and it uses Django Mi

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Ryan Nowakowski
it uses Django Microsoft >Authentication Backend. Starting yesterday when we deploy the app the >auth >is now not working. We get back Failed to authenticate you for an >unknown >reason. Please try again later. We can see in the azure logs that the >login >was successful. We ha

Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-22 Thread Larry Martell
I have an app deployed in many places and it uses Django Microsoft Authentication Backend. Starting yesterday when we deploy the app the auth is now not working. We get back Failed to authenticate you for an unknown reason. Please try again later. We can see in the azure logs that the login was

How to use django login_required decorator for custom authentication backend?

2020-06-07 Thread reasm
Hi, I have created an authentication backend that allows users to login using their username, password and institute id. Although the user can login but it doesn’t get access to the view with login_required decor. When I login to the site it redirects to this url: ' http://xxx.xx.xx.x

Custom authentication backend does not get credentials

2019-07-16 Thread Cristhiam Gabriel Fernández
Hi everyone My project uses two authentications ways for different users. Administrator users authenticate themselves with username and password (ModelBackend). Customers authenticate themselves with phonenumber and token (custom authentication backend). My custom backend authentication

Re: Authentication backend - serialization

2017-06-08 Thread Alison P
", and everything works as it should be! Have a nice day! A. On Monday, June 5, 2017 at 1:33:28 PM UTC+2, Alison P wrote: > > Hi everyone, > > I have written a custom authentication backend, the code is below. It > allows a user to click "email me a one-time password&quo

Re: Authentication backend - serialization

2017-06-05 Thread Melvyn Sopacua
On Monday 05 June 2017 04:14:01 Alison P wrote: > If I use the default session serializer, I get the following error: > TypeError at /login/ > > is not JSON serializable I'm using this is a general solution. Feel free to strike what you don't need. The basics is that a JSONEncoder knows primiti

Re: Authentication backend - serialization

2017-06-05 Thread ludovic coues
6-05 13:14 GMT+02:00 Alison P : > Hi everyone, > > I have written a custom authentication backend, the code is below. It allows > a user to click "email me a one-time password" on the home page, which is > saved on the "Person" model (which extends User throu

Authentication backend - serialization

2017-06-05 Thread Alison P
Hi everyone, I have written a custom authentication backend, the code is below. It allows a user to click "email me a one-time password" on the home page, which is saved on the "Person" model (which extends User through a foreign key) and then log in with that password. T

Re: Django rest framework JWT and custom authentication backend

2017-05-28 Thread Melvyn Sopacua
On Saturday 27 May 2017 02:08:02 Robin Lery wrote: > curl -X POST -d "email=ad...@gmail.com&password=123123" > http://localhost/api-token-auth/ > > "non_field_errors": [ > "Unable to log in with provided credentials." > ] > > What am I missing? Why is it that its working while loggin to th

Django rest framework JWT and custom authentication backend

2017-05-26 Thread Robin Lery
I have a custom user model and have created a custom authentication backend. I am using django rest framework JWT <http://getblimp.github.io/django-rest-framework-jwt/#extending-jsonwebtokenauthentication> for token authentication. User model: class User(AbstractBaseUser, Permission

Django custom Authentication Backend

2017-04-13 Thread ahmadyosr
Hello everyone I've been trying to create a custom Authentication Backend in Django , It worked .. And it returns an authenticated user and It Logs-in successfuly, BUT , whenever I refresh the page or move for another page it just logout ! it doesn't stuck logged in . here's t

Re: Custom authentication backend

2013-07-19 Thread Rok Jaklič
Found an answer here: http://stackoverflow.com/questions/10874675/why-does-django-need-a-database-for-custom-authentication-backends On Thursday, July 18, 2013 1:12:04 PM UTC+2, Rok Jaklič wrote: > > Hi, > > if I write custom authentication backend, do I need to create user in >

Custom authentication backend

2013-07-18 Thread Rok Jaklič
Hi, if I write custom authentication backend, do I need to create user in local database so that method get_user can find it? Can I avoid creating user in local database? Rok -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: Building authentication backend

2012-02-01 Thread Lee Hinde
On Feb 1, 2012, at 12:24 AM, apalsson wrote: > Hello. > > A very simple question. > > I am building an authentication back end to support TWO passwords. > This requires me to add an extra table to store the secondary password > plus a ForeignKey to User. > > The confusing part is, how I make Dj

Re: Building authentication backend

2012-02-01 Thread Mario Gudelj
I'm new to Django too, but I suspect you'd do something like this: class AdditinoalUserInfo(models.Model): user = models.ForeignKey(User, unique=True) extra_password = models.CharField("Password", blank=True) That will create a new table for you and a column for new password. You then nee

Building authentication backend

2012-02-01 Thread apalsson
Hello. A very simple question. I am building an authentication back end to support TWO passwords. This requires me to add an extra table to store the secondary password plus a ForeignKey to User. The confusing part is, how I make Django automatically create the needed table when SyncDB is run? A

Re: Customized authentication backend.

2011-11-29 Thread Andre Terra
Hello, Shaini Please read https://code.djangoproject.com/wiki/UsingTheMailingList Sincerely, André Terra On Tue, Nov 29, 2011 at 5:21 AM, shaini sasidhar wrote: > Hi.. > > Need to customize authentication backend in my Django > project.Also want to authenticate based

Customized authentication backend.

2011-11-28 Thread shaini sasidhar
Hi.. Need to customize authentication backend in my Django project.Also want to authenticate based on one of my MySQL table data(table Customers).How can I modify that Customers class in model.py file for declaring user robject.Please help me with some example. -- You received this

Re: Authentication backend

2011-11-25 Thread Ivo Brodien
ustomize the authentication backend.Created > my own authentication backend and added in settings.py file.But the > login doesnot work properly.I think the user object creation in model > class troubles me.. > > -- > You received this message because you are subscribed to the

Authentication backend

2011-11-25 Thread shaini sasidhar
Hi... I had configured Django admin site with MySQL database and it works fine..But I want to customize the authentication backend.Created my own authentication backend and added in settings.py file.But the login doesnot work properly.I think the user object creation in model class

Re: Accessing "request" from within an authentication backend

2011-07-26 Thread Scott Gould
I'd raise a custom exception (e.g. "PasswordExpiredError") and handle the message creation in the view. On Jul 26, 3:59 pm, Steven Smith wrote: > Is there a way to access the HttpResponse, or issue a redirect from > within a custom authentication backend? I have Django hook

Accessing "request" from within an authentication backend

2011-07-26 Thread Steven Smith
Is there a way to access the HttpResponse, or issue a redirect from within a custom authentication backend? I have Django hooked up to our Active Directory server, and it works perfectly except when the user's password expires or they have "User must change password at next login&quo

Authentication backend

2010-10-01 Thread simonty
Hi Django folks, I'm just getting into Django and I'm writing my own authentication backend by implementing authenticate and get_user. Because my authentication uses a different hash algorithim (not sha1), I want to implement my own UserManager.create_user, User.set_password, User.chec

Re: Authentication backend for Facebook problems

2010-04-26 Thread Martin Lundberg
That will improve the situation a lot, thanks! It doesn't change the fact that it would feel more correct to have it in an authentication backend :) On Mon, Apr 26, 2010 at 5:40 PM, Joe wrote: > > On Apr 26, 5:42 am, Martin Lundberg wrote: > > I was told to create a middlewar

Re: Authentication backend for Facebook problems

2010-04-26 Thread Joe
On Apr 26, 5:42 am, Martin Lundberg wrote: > I was told to create a middleware which I did but it feels wrong since > it is called on every request for everything. And if I add > authentication by Twitter and maybe Google, there will be even more > middleware that is called everytime. > > What is

Authentication backend for Facebook problems

2010-04-26 Thread Martin Lundberg
Hello, I wanted to create an authentication backend for Facebook using their new Graph API. I however found out (after talking to some people on #django IRC) that I could not access the cookies in a authentication backend. Now I can't create it since it works by checking if some cookie

Re: Custom Authentication Backend

2009-12-03 Thread bfrederi
Well, I started to write a new login for auth, and you are right, it is WAY more trouble than it's worth. I don't think I need anything as big as django-ldap-groups (which is nice), but I am just going to save the users into django's auth user table and just separate out the ldap users in admin I g

Re: Custom Authentication Backend

2009-12-03 Thread Frank DiRocco
Or you could hack/port the library Peter spoke of earlier and add the functionality you are looking for :] but how would you admin it, and i bet alot would break at first sight. On Dec 3, 2009, at 4:33 PM, Peter Herndon wrote: > > On Dec 3, 2009, at 3:29 PM, bfrederi wrote: > >> I'm not looki

Re: Custom Authentication Backend

2009-12-03 Thread Peter Herndon
On Dec 3, 2009, at 3:29 PM, bfrederi wrote: > I'm not looking to avoid effort. I just don't want a bunch of extra > users cluttering up my system if I don't need to. I have no desire for > them to exist in my system for any reason. I want to keep the number > of django users limited in my system

Re: Custom Authentication Backend

2009-12-03 Thread bfrederi
I'm not looking to avoid effort. I just don't want a bunch of extra users cluttering up my system if I don't need to. I have no desire for them to exist in my system for any reason. I want to keep the number of django users limited in my system so it is easier to manage them in admin. Thanks for t

Re: Custom Authentication Backend

2009-12-02 Thread Mike Dewhirst
bfrederi wrote: > I am writing my own custom authentication for AD/ldap and I am trying > to authenticate the user without saving the user in the Django User > table. I also don't want the user to have to log in every time they > want to view something. Is there any way to not save the user in the

Custom Authentication Backend

2009-12-02 Thread bfrederi
I am writing my own custom authentication for AD/ldap and I am trying to authenticate the user without saving the user in the Django User table. I also don't want the user to have to log in every time they want to view something. Is there any way to not save the user in the Django User table and ke

Authentication Backend: get access to request

2009-09-28 Thread Florian Schweikert
Hi, I'm writing an own auth backend at the moment, but I need access to the request object. I found a possible solution with adding settings.request = request into a middleware, but that's seems not beautilful to me. My backend is something like this at the moment, to check the hash I need the cl

Re: custom authentication backend not being used...

2009-08-19 Thread Peter Herndon
On 08/19/2009 02:04 PM, Jay wrote: > Sorry, nevermind. I finally figured this out right after I posted > this. > > What was the solution? Both for posterity, and because I'm personally curious. Thanks, ---Peter --~--~-~--~~~---~--~~ You received this messa

Re: custom authentication backend not being used...

2009-08-19 Thread Jay
Sorry, nevermind. I finally figured this out right after I posted this. On Aug 19, 12:48 pm, Jay wrote: > First off, I'm using Django 1.1. > > I've been having problems getting my custom authentication backend to > work, specifically in the "admin" site. > &

custom authentication backend not being used...

2009-08-19 Thread Jay
First off, I'm using Django 1.1. I've been having problems getting my custom authentication backend to work, specifically in the "admin" site. I've been using this page as guide to put together an auth backend that uses my subclass of the User model to authenticate.

Re: Strange problem with LDAP authentication backend

2009-08-13 Thread David De La Harpe Golden
stupidgeek wrote: > David, you are a champ, thank you. > I find it strange that this made the difference, since this line is in > the docs: > > "The get_user method takes a user_id -- which could be a username, > database ID or whatever -- and returns a User object." > We-ell, the "user_id" it

Re: Strange problem with LDAP authentication backend

2009-08-12 Thread stupidgeek
David, you are a champ, thank you. I find it strange that this made the difference, since this line is in the docs: "The get_user method takes a user_id -- which could be a username, database ID or whatever -- and returns a User object." But, making the change to user_id worked just fine. For ev

Re: Strange problem with LDAP authentication backend

2009-08-12 Thread David De La Harpe Golden
stupidgeek wrote: > def get_user(self, username): > try: >user = User.objects.get(username=username) >print user >return user > except User.DoesNotExist: > return None > Note part of the auth backend protocol AFAICS involves c

Re: Strange problem with LDAP authentication backend

2009-08-12 Thread stupidgeek
Hi Peter, Thanks for your input, but I am afraid to say that you are indeed wrong =( Ha. The user that I am trying to login as (me) has superuser premissions; by no errors, I mean that I get a plain login form - no red box telling me something went wrong. Thanks again for the input, and I'll gr

Re: Strange problem with LDAP authentication backend

2009-08-12 Thread Peter Herndon
On 08/12/2009 11:17 AM, stupidgeek wrote: > Hi all, > > I'm having a strange problem. I wrote a basic LDAP backend, to > authenticate users against our open directory server: > > [snip] > > Note that the print user line works, so a valid user is being > returned, meaning the bind works just f

Strange problem with LDAP authentication backend

2009-08-12 Thread stupidgeek
Hi all, I'm having a strange problem. I wrote a basic LDAP backend, to authenticate users against our open directory server: from django.contrib.auth.models import User import ldap import ldap.sasl class LDAPBackend: def authenticate(self, username=None, password=None): if username

Re: Custom authentication backend and User passwords

2009-01-29 Thread Delta20
Thanks Malcolm. For anyone interested in this topic, I have created a snippet with my solution: http://www.djangosnippets.org/snippets/1301/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Custom authentication backend and User passwords

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 11:34 -0800, Delta20 wrote: > Is there a way to make it so that when you create a User in admin, the > password is set such that the user cannot login using ModelBackend? Have a look at this: http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.s

Custom authentication backend and User passwords

2009-01-28 Thread Delta20
ant there to be a valid password in auth_user. I may remove ModelBackend as an authentication backend, but even in that case, I still don't want valid passwords in the DB. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Active Directory Authentication Backend Using SSL

2008-10-27 Thread Jashugan
Hello, I have been using a Django snippet (http://www.djangosnippets.org/ snippets/901/) to authenticate over LDAP with our Active Directory. It's been working fine without SSL, but I am having some problems getting it up and running with SSL. I have the SSL certificate (base 64 encoded) for our

Re: Authentication backend question

2008-05-12 Thread alex finn
Ramiro, thanks for the link, that's really what I need. I will create a middleware for my authentication needs. To be more specific on what I need: we have a huge infrastructure with many different web-based systems running on different servers and created with different technologies/platforms. B

Re: Authentication backend question

2008-05-12 Thread Ramiro Morales
On Mon, May 12, 2008 at 10:48 AM, finnam <[EMAIL PROTECTED]> wrote: > > Hi, > > I need to create a custom authentication backend that will > authenticate user based on the HTTP headers for the request. But in > django manual I don't see any way to obtain H

Authentication backend question

2008-05-12 Thread finnam
Hi, I need to create a custom authentication backend that will authenticate user based on the HTTP headers for the request. But in django manual I don't see any way to obtain HttpRequest instance in the authenticate() method. For example, if I receive a request with http header USER_NAME

Authentication-backend problem

2008-04-29 Thread Hanne Moa
I have a type of user that is logged in to the site in a way externally (SAML2-module for apache) to django (newest newforms-admin branch). This external login-process leaves a token in the environment-variables: while the token is in the envvars, the user is logged in. (I hope to write a SAML2 mo

Re: Users from custom authentication backend cannot login

2006-10-23 Thread Florian Heinle
What I meant was that the user cannot login to the administration pages provided by django.contrib.admin, which does login the user as far as I can tell --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Users from custom authentication backend cannot login

2006-10-23 Thread Florian Heinle
Hi, I created my own authentication backend which gets users from another table (webforum). I used http://www.djangoproject.com/documentation/authentication/#writing-an-authentication-backend as a starting point and the final backend looks like this: http://rafb.net/paste/results/gaXtif32.html

Re: Users from custom authentication backend cannot login

2006-10-23 Thread Joseph Kocherhans
On 10/23/06, Florian Heinle <[EMAIL PROTECTED]> wrote: > > I created my own authentication backend which gets users from another > table (webforum). I used > http://www.djangoproject.com/documentation/authentication/#writing-an-authentication-backend > as a starting point

Re: Users from custom authentication backend cannot login

2006-10-23 Thread Florian Heinle
sorry, paste expired. try http://www.planet-tiax.de/backend.txt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe

Users from custom authentication backend cannot login

2006-10-23 Thread Florian Heinle
Hi, I created my own authentication backend which gets users from another table (webforum). I used http://www.djangoproject.com/documentation/authentication/#writing-an-authentication-backend as a starting point and the final backend looks like this: http://rafb.net/paste/results/gaXtif32.html