Skip to content

Instantly share code, notes, and snippets.

View pabloteari's full-sized avatar

Pablo Figueiredo Alberto pabloteari

View GitHub Profile
@mattbennett
mattbennett / client.py
Created April 14, 2017 15:00
Nameko Auth Toy
from nameko.standalone.rpc import ClusterRpcProxy
config = {
'AMQP_URI': 'amqp://guest:guest@localhost:5672/'
}
with ClusterRpcProxy(config) as rpc:
session_token = rpc.auth.login("admin", "secret")
with ClusterRpcProxy(config, context_data={'session': session_token}) as rpc: