0
votes

I am building an API with Django Tastypie and I am trying to implement the ApiKeyAuthentication.

My system doesn't use the built in User model that Django provides and all the examples seem to rely on that.

I've created my own version of the User model called Author which is much simpler. For the ApiKeyAuthorization I was hoping to be able to use the id of an Author rather than the username of the User model.

Is there a way I can build this authorization system without using the User model?

1

1 Answers

0
votes

ApiKeyAuthentication relies on Django's builtin User object. It's a fairly simple class implementation, looking at its source should give you an idea how to write your own Authentication model.