BlueBrain / BlueBrain/nexus-forge
Add method to generate the contribution information from a token
Open
enhancement
- Dominant language
- Python
- Stars
- 52
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Add a method to generate automatically a contribution object with the shape:
```contribution = forge.from_json({
"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})```
Contributor guide
Assessment
This issue has not been assessed yet.