from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
-__all__ = ['ServiceTicket', 'LoginTicket']
+__all__ = ['ServiceTicket', 'LoginTicket', 'ProxyGrantingTicket', 'ProxyTicket', 'ProxyGrantingTicketIOU']
class BaseTicket(models.Model):
ticket = models.CharField(_('ticket'), max_length=32)
class BaseTicket(models.Model):
ticket = models.CharField(_('ticket'), max_length=32)
- user = models.ForeignKey(User, verbose_name=_('user'))
- service = models.URLField(_('service'), verify_exists=False)
+ user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('user'))
+ service = models.URLField(_('service'))
class ProxyGrantingTicket(BaseTicket):
serviceTicket = models.ForeignKey(ServiceTicket, null=True)
pgtiou = models.CharField(max_length=256, verbose_name=_('PGTiou'))
class ProxyGrantingTicket(BaseTicket):
serviceTicket = models.ForeignKey(ServiceTicket, null=True)
pgtiou = models.CharField(max_length=256, verbose_name=_('PGTiou'))