Thanks Ben, I'll see if I can figure out how to put the class
together.

On Jun 17, 5:20 pm, Ben Davis <bendavi...@gmail.com> wrote:
> I believe what you are looking for is a custom authentication backend.  I
> had to do this for one of my sites that used an XMLRPC api to authenticate
> against a remote server.  You'll want to create a class that extends
> django.contrib.auth.backends.ModelBackend ,  and add it to the
> AUTHENTICATION_BACKENDS setting.
>
> One thing to be wary of though -- if your authentication code at any point
> throws a TypeError,  you might have a hard time debugging it -- see this bug
> for more info:http://code.djangoproject.com/ticket/10378
>
>
>
> On Tue, Jun 16, 2009 at 4:20 PM, Daniel Jewett <d...@solidether.net> wrote:
>
> > I have a circumstance that requires me to use an alternative
> > authentication scenario. The authentication to our school's web site/
> > services is handled by the the hosting service. (There is some sort of
> > syncing that occurs with our local Active Directory database.)
>
> > I'm installing some Django apps on the school's local webserver which
> > needs to authenticate against the remote database.
>
> > The hosting service sent me this decrypt function in ASP.
>
> > Function DeCrypt(strEncrypted, strKey)
> >   Dim strChar, iKeyChar, iStringChar
> >   For i = 1 To Len(strEncrypted)
> >      iKeyChar = (Asc(Mid(strKey, i, 1)))
> >      iStringChar = Asc(Mid(strEncrypted, i, 1))
> >      iDeCryptChar = iKeyChar Xor iStringChar
> >      strDecrypted = strDecrypted & Chr(iDeCryptChar)
> >   Next
> >   DeCrypt = strDecrypted
> > End Function
>
> > UserName = Decrypt(request.Cookies("sample")("u"), "Encrypt Key")
>
> > I'm assuming this Xor decrypt function can be rewritten in Python but
> > I could use some help getting started on how to put this all together.
--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to