Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)
Token type interface

``id`` unique token type id. Token service uses this id
for token type identification in tokens storage.

``timeout`` token timout, it has to be timedelta instance.

src/p/t/ptah-0.8.0/ptah/password.py   ptah(Download)
 
TOKEN_TYPE = token.TokenType(
    '35c9b7df958f4e93ae9b275a7dc2219e', timedelta(minutes=10),
    'Reset password tokens')
 
        :param principal: Principal object
        """
        return token.service.generate(TOKEN_TYPE, principal.__uri__)
 
    def remove_passcode(self, passcode):

src/p/t/ptah-HEAD/ptah/password.py   ptah(Download)
 
TOKEN_TYPE = token.TokenType(
    '35c9b7df958f4e93ae9b275a7dc2219e', timedelta(minutes=10),
    'Reset password tokens')
 
        :param principal: Principal object
        """
        return token.service.generate(TOKEN_TYPE, principal.__uri__)
 
    def remove_passcode(self, passcode):

src/p/t/ptah_crowd-0.1/ptah_crowd/validation.py   ptah_crowd(Download)
 
TOKEN_TYPE = ptah.token.TokenType(
    'cd51f14e9b2842608ccadf1a240046c1', timedelta(hours=24))
 
 
def initiate_email_validation(email, principal, request):
    """ initiate principal email validation """
    t = ptah.token.service.generate(TOKEN_TYPE, principal.__uri__)

src/p/t/ptahcrowd-0.2/ptahcrowd/validation.py   ptahcrowd(Download)
 
TOKEN_TYPE = ptah.token.TokenType(
    'cd51f14e9b2842608ccadf1a240046c1', timedelta(hours=24))
 
 
    :param request: current request object
    """
    t = ptah.token.service.generate(TOKEN_TYPE, principal.__uri__)
    template = ValidationTemplate(principal, request, email=email, token = t)
    template.send()

src/p/t/ptahcrowd-HEAD/ptahcrowd/validation.py   ptahcrowd(Download)
 
TOKEN_TYPE = ptah.token.TokenType(
    'cd51f14e9b2842608ccadf1a240046c1', timedelta(hours=24))
 
 
    :param request: current request object
    """
    t = ptah.token.service.generate(TOKEN_TYPE, principal.__uri__)
    template = ValidationTemplate(principal, request, email=email, token = t)
    template.send()

src/p/t/ptah-0.8.0/ptah/tests/test_token.py   ptah(Download)
    def test_token(self):
        from ptah import token
 
        tt = token.TokenType('unique-id', timedelta(minutes=20))
        self.init_ptah()
    def test_token_type(self):
        from ptah import token
 
        token.TokenType('unique-id', timedelta(minutes=20))
        token.TokenType('unique-id', timedelta(minutes=20))

src/p/t/ptah-HEAD/ptah/tests/test_token.py   ptah(Download)
    def test_token(self):
        from ptah import token
 
        tt = token.TokenType('unique-id', timedelta(minutes=20))
        self.init_ptah()
    def test_token_type(self):
        from ptah import token
 
        token.TokenType('unique-id', timedelta(minutes=20))
        token.TokenType('unique-id', timedelta(minutes=20))