External authentication in a Django app
<p>As the title says, I'm developing a Django app which uses another API to authenticate the user. The external API is quite simple and returns a certificate if the user is properly authenticated. My app should not keep any user's information, except it's certificate and id (which I'm keeping as session variables).</p>

<p>As a drawback of this implementation, I'm not using Django’s authentication system and all the practical methods it offers, like to check if the user <code>is_authenticated</code>, <code>is_anonymous</code> or to get user's permissions.</p>

<p>As the user must be logged to access some pages of my app, I must aswell ask him/her to log in so that he/she could continue. Therefore, using <code>@login_required</code> would be handful.</p>

<p>I must also create a Access Control module to check permissions and to allow access to some restricted areas of the app according to groups of users (common users, admins, etc.).</p>

<p>Do you guys know how could I customize Django's authentication system to handle all theses issues?</p>