django REST ldap authentication with Cassandra - django

I am writing a rest api using django rest framework. I store my data in Cassandra. I am using django-cassandra-engine as my backend. My api works fine, but now I need add LDAP authentication.
I intend to use this package called django-auth-ldap. From what I understand django-cassandra-engine doesn't support django-auth module on which django-auth-ldap rely on?
I have never worked with Cassandra before, and I consider myself a Django newbie.
Can someone be so kind and give me few hints how can I do this? Much appreciated.
Thanks in advance!

Related

How create application backend in django and create a api so that other developers can use that as well

I just started learning Django and wanted to make an application with API (probably REST) endpoints so that other developers can use it as well (like GitHub API), and I could connect it to my react app and android app. I want my backend to be on a different server and do not want to build my react app integrated with Django backend using the REST Framework.
Can anyone just give me the general idea of what I need to do?
P.S. Sorry in advance if my question sounds silly, I am still new to backend.
Creating a Django REST API should be your first step. This is pretty simple if you already have a Django app running, and will allow your React app or Android app to connect and access data.
Authentication is a step beyond. You may want to look into implementing authentication on the server you will be hosting your back end on. You can also read through this article for some guidance on implementing auth on the DRF side.
Best of luck!
First off all you can start from this.
https://www.django-rest-framework.org/tutorial/quickstart/

Can Django be used to combine both webapp and moblie api?

I want to use django framework to write a web site with static/dynamic pages (I will not be using angular/react - i.e. SPA technology) but I also want the web app to serve as the backend for a mobile app.
What's the best practice here? Can Django alone be used for it?
Will I need to use Django REST framework?
If you could recommend some specific modules to keep the app as simple as possible and avoid DRY code. That'd be great.
Thanks.
You have the right pointers in your question already.
Use django-rest-framework to create a rest service, create your web app in django to consume that service, create a mobile app to consume the same rest service.
In general, once you have a rest service, you can build anything on top of it. Just consume the service from whichever platform you want to build for.
I hope that helps.

How to use API Auth using Django MongoEngine REST?

I'm building an API REST using Django and MongoDB with django-rest-framework-mongoengine package from https://github.com/umutbozkurt/django-rest-framework-mongoengine
How can I use Django Rest Framework API TokenAuthentication if this package does not use Django's built in ORM ?
I solve it by handling TokenAuthentication or any other type of DRF auth using Django's build in ORM with MySQL database (Just to handle API authentication). I use MongoDB as my primary system database. So yes, i'm using two databases, one for auth API and the other for transactions.
Don't know if this is the best way to achieve this but it works.
I hope this helps to anyone who's trying or thinking to work with this architecture :)

Dart authentication registration

I am building a single page javascript app using dart, what are the recommended ways to handle user authentication and registration?
Take a look at http://code.google.com/p/google-api-dart-client/ for information about using oAuth with Dart.
I noticed that you tagged this with django. I'm assuming then that you are using Django in some way. If that is the case, can you not use the authentication provided by Django itself?
There is now the easy to use Google OAuth2 Library, which you can get from Pub.
Here is a great guide on how to use the package from Dartwatch.

How to integrate social-auth in my project

I want to use social-auth to provide registration/authentication via social network sites. I have been trying to understand how to use social-auth, but I have been unable to get beyond installing dependencies and configuring backends.
I am basically new to Django and I have tried hard to understand before posting on the forum. Maybe because I am not very familiar with it that is why I have been unsuccessful. Can anybody please point me to a tutorial on how to use social-auth. This will also help me in integrating other apps.
Update:
Although the answer given below solved my problem, I just want to share that I ended up using django-allauth instead of social-auth. And the latest version of django-allauth appears to be the best Django authentication app.
It's somehow unclear from documentation.
You need to create apps in Twitter/Facebook/whatever you want to use.
If you want twitter see: https://dev.twitter.com/apps/new
If you want facebook: https://developers.facebook.com/apps
They will give you api key and api secret.
Follow these basic steps that refer to socialauth docs:
pip install
add social-auth to installed apps
copy AUTHENTICATION_BACKENDS
fill api key and api secret
add social auth url patterns
configure authentication and association complete URL names (SOCIAL_AUTH_COMPLETE_URL_NAME)
context processor
syncdb
Now, what the documentation doesn't tell you, is to put links in your login template:
Login with Twitter
Should work.