Skip to content

Commit 08cef05

Browse files
committed
more indentation
1 parent 25e6fa7 commit 08cef05

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

scripts/mock-authentication.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def get_access_token(self, private_key_path: str, force_refresh: bool = False) -
261261
raise
262262

263263
def call_api(self, api_url: str, private_key_path: str, method: str = 'GET',
264-
headers: Optional[Dict] = None, **kwargs) -> requests.Response:
264+
headers: Optional[Dict] = None, **kwargs) -> requests.Response:
265265
"""
266266
Call an NHS API with authentication
267267
@@ -300,25 +300,25 @@ def main():
300300
formatter_class=argparse.RawDescriptionHelpFormatter,
301301
epilog="""
302302
Examples:
303-
# Generate key pair and JWKS
304-
%(prog)s generate-keys --api-key YOUR_API_KEY --env int
303+
# Generate key pair and JWKS
304+
%(prog)s generate-keys --api-key YOUR_API_KEY --env int
305305
306-
# Get access token
307-
%(prog)s get-token --api-key YOUR_API_KEY --env int --private-key int-1.pem
306+
# Get access token
307+
%(prog)s get-token --api-key YOUR_API_KEY --env int --private-key int-1.pem
308308
309309
# Call an API
310310
%(prog)s call-api --api-key YOUR_API_KEY --env sandbox --private-key int-1.pem \\
311-
--url https://sandbox.api.service.nhs.uk/hello-world/hello/application
311+
--url https://sandbox.api.service.nhs.uk/hello-world/hello/application
312312
313-
# Call an API with NHS number
314-
%(prog)s call-api --api-key YOUR_API_KEY --env int --private-key int-1.pem \\
315-
--url https://int.api.service.nhs.uk/eligibility-signposting-api/patient-check/123 \\
316-
--nhs-number 123
313+
# Call an API with NHS number
314+
%(prog)s call-api --api-key YOUR_API_KEY --env int --private-key int-1.pem \\
315+
--url https://int.api.service.nhs.uk/eligibility-signposting-api/patient-check/123 \\
316+
--nhs-number 123
317317
318-
# Call an API with custom headers
319-
%(prog)s call-api --api-key YOUR_API_KEY --env int --private-key int-1.pem \\
320-
--url https://int.api.service.nhs.uk/some-api/endpoint \\
321-
--header "X-Custom-Header: value" --header "Another-Header: value2"
318+
# Call an API with custom headers
319+
%(prog)s call-api --api-key YOUR_API_KEY --env int --private-key int-1.pem \\
320+
--url https://int.api.service.nhs.uk/some-api/endpoint \\
321+
--header "X-Custom-Header: value" --header "Another-Header: value2"
322322
"""
323323
)
324324

@@ -337,10 +337,10 @@ def main():
337337
token_parser = subparsers.add_parser('get-token', help='Get access token')
338338
token_parser.add_argument('--api-key', required=True, help='Your API key')
339339
token_parser.add_argument('--env', choices=['dev', 'int', 'prod'], default='int',
340-
help='Environment (default: int)')
340+
help='Environment (default: int)')
341341
token_parser.add_argument('--kid', help='Key identifier (default: {env}-1)')
342342
token_parser.add_argument('--private-key', required=True,
343-
help='Path to private key PEM file')
343+
help='Path to private key PEM file')
344344

345345
# Call API command
346346
api_parser = subparsers.add_parser('call-api', help='Call an API endpoint')
@@ -416,7 +416,7 @@ def main():
416416
print(f"Warning: Ignoring invalid header format: {header}")
417417

418418
response = auth.call_api(args.url, args.private_key, args.method,
419-
headers=additional_headers if additional_headers else None)
419+
headers=additional_headers if additional_headers else None)
420420

421421
print("\n" + "="*70)
422422
print("RESPONSE:")

0 commit comments

Comments
 (0)