Exemplo n.º 1
0
def make_webenv(config, rest):
    if args.tag:
        qtag = quote_plus(args.tag)
    else:
        qtag = 'default'

    ent_conf = None
    try:
        ent_conf = rest.construct_config(quote_plus(args.issuer), qtag)
    except Exception as err:
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    _path, app_args = construct_app_args(args, config, oper, func, profiles,
                                         ent_conf)

    # Application arguments
    app_args.update({
        "msg_factory": oic_message_factory,
        'profile_map': PROFILEMAP,
        'profile_handler': ProfileHandler,
        'client_factory': Factory(Client)
    })

    if args.insecure:
        app_args['client_info']['verify_ssl'] = False

    return app_args
Exemplo n.º 2
0
def make_webenv(config, rest):
    if args.tag:
        qtag = quote_plus(args.tag)
    else:
        qtag = 'default'

    ent_conf = None
    try:
        ent_conf = rest.construct_config(quote_plus(args.issuer), qtag)
    except Exception as err:
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    _path, app_args = construct_app_args(args, config, oper, func, profiles,
                                         ent_conf)

    # Application arguments
    app_args.update(
        {"msg_factory": oic_message_factory, 'profile_map': PROFILEMAP,
         'profile_handler': ProfileHandler,
         'client_factory': Factory(Client)})

    if args.insecure:
        app_args['client_info']['verify_ssl'] = False

    return app_args
Exemplo n.º 3
0
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    display_order = [
        "Discovery", "Registration", "Authorization request", "AccessToken"
    ]

    _path, app_args = construct_app_args(args,
                                         CONF,
                                         request,
                                         func,
                                         profiles,
                                         ent_conf,
                                         display_order=display_order)

    app_args.update({
        "msg_factory": message_factory,
        'check_factory': check.factory,
        'profile_handler': ProfileHandler,
        'make_entity': make_client,
        'map_prof': PROFILEMAP,
        'client_factory': Factory(Client)
    })

    WA = WebApplication(sessionhandler=SessionHandler,
                        webio=WebIh,
Exemplo n.º 4
0
    else:
        qtag = 'default'

    ent_conf = None
    try:
        ent_conf = rest.construct_config(quote_plus(args.issuer), qtag)
    except Exception as err:
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    _path, app_args = construct_app_args(args, CONF, oper, func, profiles,
                                         ent_conf)
    _conf = app_args['conf']

    # Application arguments
    app_args.update({
        "msg_factory": oic_message_factory,
        'profile_map': PROFILEMAP,
        'profile_handler': ProfileHandler,
        'client_factory': Factory(Client)
    })

    if args.insecure:
        app_args['client_info']['verify_ssl'] = False

    WA = WebApplication(sessionhandler=SessionHandler,
                        webio=WebIh,
Exemplo n.º 5
0
    else:
        qtag = 'default'

    ent_conf = None
    try:
        ent_conf = rest.construct_config(quote_plus(args.issuer), qtag)
    except Exception as err:
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    _path, app_args = construct_app_args(args, CONF, request, func, profiles,
                                         ent_conf)

    app_args.update(
        {"msg_factory": message_factory,
         'check_factory': check.factory, 'profile_handler': ProfileHandler,
         'make_entity': make_client, 'map_prof': PROFILEMAP,
         'client_factory': Factory(Client)})

    WA = WebApplication(sessionhandler=SessionHandler, webio=WebIh,
                        webtester=WebTester, check=check, webenv=app_args,
                        pick_grp=pick_grp, path=_path)

    _conf = app_args['conf']

    SRV = wsgiserver.CherryPyWSGIServer(
        ('0.0.0.0', args.port),
Exemplo n.º 6
0
    else:
        qtag = 'default'

    ent_conf = None
    try:
        ent_conf = rest.construct_config(quote_plus(args.issuer), qtag)
    except Exception as err:
        print('iss:{}, tag:{}'.format(quote_plus(args.issuer), qtag))
        for m in traceback.format_exception(*sys.exc_info()):
            print(m)
        exit()

    setup_logging("%s/rp_%s.log" % (SERVER_LOG_FOLDER, args.port), logger)
    logger.info('construct_app_args')

    _path, app_args = construct_app_args(args, CONF, oper, func, profiles,
                                         ent_conf)
    _conf = app_args['conf']

    # Application arguments
    app_args.update(
        {"msg_factory": oic_message_factory, 'profile_map': PROFILEMAP,
         'profile_handler': ProfileHandler,
         'client_factory': Factory(Client)})

    if args.insecure:
        app_args['client_info']['verify_ssl'] = False

    WA = WebApplication(sessionhandler=SessionHandler, webio=WebIh,
                        webtester=WebTester, check=check, webenv=app_args,
                        pick_grp=pick_grp, path=_path)