4

I'm developing a REST API in python with tornado and I'm going to implement the authentication and authorization, trying to avoid lock-in to other big projects i.e django. I'm looking around through forums and SO too and I've fond a solution that could fit: repoze.who/what. It seems a good solution but I'm a bit scared about the activity of the projects (repoze.what last release seems to be 1.0.9 (2010-03-04)) and if it can work with async IO.

Anyone have tried it and/or knows something else?

opalenzuela
  • 3,139
  • 21
  • 41
0x41ndrea
  • 385
  • 5
  • 23
  • How about you test it? And what "something else" are you looking for? Authentication framework? How about OAUTH, LDAP, MySQL backend? – Torxed Oct 08 '13 at 13:21
  • thank you, of course I'm going to try it, but maybe you didn't have clear what a framework is. – 0x41ndrea Oct 09 '13 at 07:23
  • Perhaps you're not clear what a "framework" is (a buzzword referring to a general purpose library for a group of functions, code that can be re-used and adapter in order to achieve a desired software product. In other words an API for an authentication mechanism and there's plenty of them, they are called OAUTH and LDAP for instance, they are frameworks on which you base your authentication and there's plenty of API/modules for them). – Torxed Oct 09 '13 at 09:01
  • i wrote a simple session manager by `redis` to authentication/authorization users. – Zaaferani May 09 '15 at 07:15

1 Answers1

0

Few months ago, I wrote python-auth. It's simple to use with a RESTFul API.

Install:

pip install auth

Run:

auth-server

Usage:

In your code:

from auth.client import Client
service = Client('srv201', '<Auth-Server IP:PORT>')
print(service)
service.get_roles()
service.add_role(role='admin')

Or use RESTFul API

Farshid Ashouri
  • 16,143
  • 7
  • 52
  • 66