+
+
+class ProxyGrantingTicket(BaseTicket):
+ serviceTicket = models.ForeignKey(ServiceTicket, null=True)
+ pgtiou = models.CharField(max_length=256, verbose_name=_('PGTiou'))
+ prefix = 'PGT'
+
+ def __init__(self, *args, **kwargs):
+ if 'pgtiou' not in kwargs:
+ kwargs['pgtiou'] = u"PGTIOU-%s" % (''.join(Random().sample(string.ascii_letters + string.digits, 50)))
+ super(ProxyGrantingTicket, self).__init__(*args, **kwargs)
+
+ class Meta:
+ verbose_name = _('Proxy Granting Ticket')
+ verbose_name_plural = _('Proxy Granting Tickets')
+
+
+class ProxyTicket(ServiceTicket):
+ proxyGrantingTicket = models.ForeignKey(ProxyGrantingTicket, verbose_name=_('Proxy Granting Ticket'))
+
+ prefix = 'PT'
+
+ class Meta:
+ verbose_name = _('Proxy Ticket')
+ verbose_name_plural = _('Proxy Tickets')
+
+
+class ProxyGrantingTicketIOU(BaseTicket):
+ proxyGrantingTicket = models.ForeignKey(ProxyGrantingTicket, verbose_name=_('Proxy Granting Ticket'))
+
+ prefix = 'PGTIOU'
+
+ class Meta:
+ verbose_name = _('Proxy Granting Ticket IOU')
+ verbose_name_plural = _('Proxy Granting Tickets IOU')
+