Open crisely09 opened 1 year ago
Add a method to generate automatically a contribution object with the shape:
"type": "Contribution", "agent": { "id": f"https://bbp.epfl.ch/nexus/v1/realms/bbp/users/{decoded['preferred_username']}", "type": ["Agent", "Person"], "givenName": decoded["given_name"], "familyName": decoded["family_name"], "name": decoded["name"], "email": decoded["email"] } })
where decoded is the Nexus decoded token: decoded = jwt.decode(TOKEN, "secret", audience="https://slack.com", options={"verify_signature": False})
decoded
decoded = jwt.decode(TOKEN, "secret", audience="https://slack.com", options={"verify_signature": False})
Add a method to generate automatically a contribution object with the shape:
where
decoded
is the Nexus decoded token:decoded = jwt.decode(TOKEN, "secret", audience="https://slack.com", options={"verify_signature": False})