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)
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)
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)
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)
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)