Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instantiate jwtPayloadJson directly #72

Open
wants to merge 1 commit into
base: stage
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions JWT/samples/adobe-jwt-python/jwtencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

# Config Data
url = 'https://ims-na1.adobelogin.com/ims/exchange/jwt'
jwtPayloadRaw = """{ "iss": "{The issuer, your Organization ID from the Adobe Developer Console integration, in the format org_ident@AdobeOrg}",
jwtPayloadJson = { "iss": "{The issuer, your Organization ID from the Adobe Developer Console integration, in the format org_ident@AdobeOrg}",
"sub": "{The subject, your Technical Account ID from the Adobe Developer Console integration, in the format: id@techacct.adobe.com}",
"{The API-access claim configured for your organization: https://ims-na1.adobelogin.com/s/ent_analytics_bulk_ingest_sdk}": true,
"aud": "{The audience for the token, your API Key from the Adobe Developer Console integration, in the format: https://ims-na1.adobelogin.com/c/api_key}" }"""
jwtPayloadJson = json.loads(jwtPayloadRaw)
jwtPayloadJson["exp"] = datetime.datetime.utcnow() + datetime.timedelta(seconds=30)
"aud": "{The audience for the token, your API Key from the Adobe Developer Console integration, in the format: https://ims-na1.adobelogin.com/c/api_key}",
"exp": datetime.datetime.utcnow() + datetime.timedelta(seconds=30) }

accessTokenRequestPayload = {'client_id': '{Your Client Id (API Key)}'
,'client_secret': 'Your Client Secret'}
accessTokenRequestPayload = { 'client_id': '{Your Client Id (API Key)}',
'client_secret': 'Your Client Secret' }

# Request Access Key
#This Needs to point at where your private key is on the file system
Expand Down