# -*- mode: python -*-
Import("env")

env = env.Clone()

env.Library(
    target='oidc',
    source=[
        'oidc_identity_providers_registry.cpp',
        'oidc_identity_providers_registry_impl.cpp',
        'oidc_server_parameters.cpp',
        'oidc_server_parameters.idl',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/crypto/jwt',
        '$BUILD_DIR/mongo/db/server_base',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/util/options_parser/options_parser',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/util/periodic_runner',
    ],
)

env.Library(
    target='oidc_commands',
    source=[
        'oidc_commands.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/auth/auth',
        '$BUILD_DIR/mongo/db/auth/authprivilege',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
        '$BUILD_DIR/mongo/db/server_base',
        'oidc',
    ],
)

env.CppUnitTest(
    target='oidc_test',
    source=[
        'oidc_commands_test.cpp',
        'oidc_identity_providers_registry_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/audit',
        '$BUILD_DIR/mongo/db/audit_interface',
        '$BUILD_DIR/mongo/db/auth/auth_impl_internal',
        '$BUILD_DIR/mongo/db/auth/authmocks',
        '$BUILD_DIR/mongo/db/auth/authorization_session_test_fixture',
        '$BUILD_DIR/mongo/util/periodic_runner',
        'oidc',
        'oidc_commands',
    ],
)
