コード例 #1
0
ファイル: server.py プロジェクト: asheidan/pyoidc
    config = importlib.import_module(args.config)

    OAS = Provider(config.issuer, SessionDB(), config.CLIENT, FUNCTIONS,
                   config.USERDB)

    try:
        OAS.cookie_ttl = config.COOKIETTL
    except AttributeError:
        pass

    try:
        OAS.cookie_name = config.COOKIENAME
    except AttributeError:
        pass

    OAS.cookie_func = http_util.cookie

    #print URLS
    if args.debug:
        OAS.debug = True

    if args.authn_as:
        OAS.authn_as = args.authn_as

    endpoints = ENDPOINTS

    add_endpoints(endpoints)
    OAS.endpoints = endpoints

    if args.port == 80:
        OAS.baseurl = config.baseurl
コード例 #2
0
ファイル: oa.py プロジェクト: biancini/pyoidc
    # User info database
    OAS = Provider(config.issuer, SessionDB(), cdb, authn, authz, verify_client, config.SYM_KEY)

    authn.srv = OAS

    try:
        OAS.cookie_ttl = config.COOKIETTL
    except AttributeError:
        pass

    try:
        OAS.cookie_name = config.COOKIENAME
    except AttributeError:
        pass

    OAS.cookie_func = http_util.make_cookie
    # print URLS
    if args.debug:
        OAS.debug = True
    if args.test:
        OAS.test_mode = True
    else:
        OAS.test_mode = False

    if args.authn_as:
        OAS.authn_as = args.authn_as

    endpoints = ENDPOINTS

    add_endpoints(endpoints)
    OAS.endpoints = endpoints