Skip to content

Commit

Permalink
Parameterize get_mdf_token
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Dec 16, 2023
1 parent c010330 commit 466d5d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/get_mdf_token.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import sys

from mdf_connect_client import MDFConnectClient
"""
This script authenticates the user against the MDF Application and prints out the
bearer token that can be used in REST calls
"""
mdfcc = MDFConnectClient(service_instance="dev")
if len(sys.argv) != 2:
print("Usage: python get_mdf_token.py <MDF Application URL>")
sys.exit(1)

mdfcc = MDFConnectClient(service_instance=sys.argv[1])
print(mdfcc._MDFConnectClient__authorizer.access_token)

0 comments on commit 466d5d6

Please sign in to comment.