Skip to content

Commit

Permalink
Merge pull request #166 from edubadges/feature/sphereon-random-offer-id
Browse files Browse the repository at this point in the history
feat: Make the offer-id unpredictable for sphereon
  • Loading branch information
Iso5786 authored Jan 23, 2025
2 parents 91a6deb + 8b791a6 commit 9b70682
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/ob3/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ def __badge_instance(self, badge_id, user):
raise Http404

def __issue_sphereon_badge(self, credential):
random_offer_id = str(uuid.uuid4());
offer_request_body = {
"credentials": ["OpenBadgeCredential"],
"grants": {
"urn:ietf:params:oauth:grant-type:pre-authorized_code": {
"pre-authorized_code": "This-is-sent-via-SMS",
"pre-authorized_code": random_offer_id,
"user_pin_required": False
}
},
Expand Down

0 comments on commit 9b70682

Please sign in to comment.