Ejemplo n.º 1
0
def dummytoken(token, **kwargs):
    """Create a dummy token for dev."""
    session = context.get('session')
    Token.delete().where(Token.access_token == token).execute()
    Token.create(session=session.pk, access_token=token, expires_in=3600*24,
                 token_type='Bearer', scope='*')
    reporter.notice('Created token', token)
Ejemplo n.º 2
0
def dummytoken(**kwargs):
    """Create a dummy token for dev."""
    session = context.get('session')
    Token.delete().where(Token.access_token == 'token').execute()
    Token.create(session=session.id,
                 access_token="token",
                 expires_in=3600 * 24)
    report('Created token', 'token', report.NOTICE)
Ejemplo n.º 3
0
Archivo: auth.py Proyecto: pjegouic/ban
def dummytoken(token, **kwargs):
    """Create a dummy token for dev."""
    session = context.get('session')
    Token.delete().where(Token.access_token == token).execute()
    Token.create(session=session.pk,
                 access_token=token,
                 expires_in=3600 * 24,
                 token_type='Bearer',
                 scope='*')
    reporter.notice('Created token', token)
Ejemplo n.º 4
0
def dummytoken(token, **kwargs):
    """Create a dummy token for dev."""
    session = context.get('session')
    Token.delete().where(Token.access_token == token).execute()
    Token.create(session=session.pk,
                 access_token=token,
                 expires_in=3600 * 24,
                 token_type='Bearer',
                 scopes="municipality_write postcode_write \
                 group_write housenumber_write position_write bal".split(),
                 status='dev')
    reporter.notice('Created token', token)
Ejemplo n.º 5
0
def dummytoken(**kwargs):
    """Create a dummy token for dev."""
    session = context.get('session')
    Token.delete().where(Token.access_token == 'token').execute()
    Token.create(session=session.id, access_token="token", expires_in=3600*24)
    report('Created token', 'token', report.NOTICE)