an auth view to validate (username, password, service) by remote service

This commit is contained in:
Valentin Samir
2015-06-03 18:15:37 +02:00
parent 690c2c3b29
commit cb84936b6c
3 changed files with 47 additions and 3 deletions

View File

@ -102,16 +102,18 @@ class User(models.Model):
url = utils.update_url(service, {'ticket':ticket.value})
return url
class BadUsername(Exception):
class ServicePatternException(Exception):
pass
class BadUsername(ServicePatternException):
"""Exception raised then an non allowed username
try to get a ticket for a service"""
pass
class BadFilter(Exception):
class BadFilter(ServicePatternException):
""""Exception raised then a user try
to get a ticket for a service and do not reach a condition"""
pass
class UserFieldNotDefined(Exception):
class UserFieldNotDefined(ServicePatternException):
"""Exception raised then a user try to get a ticket for a service
using as username an attribut not present on this user"""
pass