Beispiel #1
0
def includeme(config):
    settings = config.registry.settings
    store, realm = setup_openid(config)
    consumer = YahooConsumer(
        storage=store,
        realm=realm,
        process_url='yahoo_process',
        oauth_key=settings.get('velruse.yahoo.consumer_key'),
        oauth_secret=settings.get('velruse.yahoo.consumer_secret'),
    )
    config.add_route("yahoo_login", "/yahoo/login")
    config.add_route("yahoo_process", "/yahoo/process",
                     use_global_views=True,
                     factory=consumer.process)
    config.add_view(consumer.login, route_name="yahoo_login")
Beispiel #2
0
def includeme(config):
    settings = config.registry.settings
    store, realm = setup_openid(config)
    consumer = GoogleConsumer(
        storage=store,
        realm=realm,
        process_url='google_process',
        oauth_key=settings.get('velruse.google.consumer_key'),
        oauth_secret=settings.get('velruse.google.consumer_secret'),
        request_attributes=settings.get('request_attributes')
    )
    config.add_route("google_login", "/google/login")
    config.add_route("google_process", "/google/process",
                     use_global_views=True,
                     factory=consumer.process)
    config.add_view(consumer.login, route_name="google_login")
Beispiel #3
0
def includeme(config):
    settings = config.registry.settings
    store, realm = setup_openid(config)
    consumer = YahooConsumer(
        storage=store,
        realm=realm,
        process_url='yahoo_process',
        oauth_key=settings.get('velruse.yahoo.consumer_key'),
        oauth_secret=settings.get('velruse.yahoo.consumer_secret'),
    )
    config.add_route("yahoo_login", "/yahoo/login")
    config.add_route("yahoo_process",
                     "/yahoo/process",
                     use_global_views=True,
                     factory=consumer.process)
    config.add_view(consumer.login, route_name="yahoo_login")