Skip to content

Commit 5a17247

Browse files
authored
Merge pull request #22 from python-scim/20-verify
implement --no-verify to avoid perform certificate checks
2 parents 3a64fc6 + 2d1f657 commit 5a17247

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

doc/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
[0.2.3] - Unreleased
5+
--------------------
6+
7+
Added
8+
^^^^^
9+
- Add the ``--no-verify`` parameter to skip certificate verifications. :issue:`20`
10+
411
[0.2.2] - 2024-12-06
512
--------------------
613

scim2_cli/__init__.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ def load_config_files(
7676
help="Headers to pass in the HTTP requests. Can be passed multiple times.",
7777
envvar="SCIM_CLI_HEADERS",
7878
)
79+
@click.option(
80+
"--no-verify",
81+
is_flag=True,
82+
default=False,
83+
help="Don't perform https certificate verifications.",
84+
)
7985
@click.option(
8086
"-s",
8187
"--schemas",
@@ -99,7 +105,13 @@ def load_config_files(
99105
)
100106
@click.pass_context
101107
def cli(
102-
ctx, url: str, header: list[str], schemas, resource_types, service_provider_config
108+
ctx,
109+
url: str,
110+
header: list[str],
111+
no_verify,
112+
schemas,
113+
resource_types,
114+
service_provider_config,
103115
):
104116
"""SCIM application development CLI."""
105117
ctx.ensure_object(dict)
@@ -108,7 +120,7 @@ def cli(
108120
raise click.ClickException("No SCIM server URL defined.")
109121

110122
headers_dict = split_headers(header)
111-
client = Client(base_url=url, headers=headers_dict)
123+
client = Client(base_url=url, headers=headers_dict, verify=not no_verify)
112124

113125
resource_models, resource_types_obj, spc_obj = load_config_files(
114126
schemas, resource_types, service_provider_config

0 commit comments

Comments
 (0)