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

feat: upload holder credentials via HTTP API #141

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Oct 29, 2024

Description of change

This update allows users to send their credentials directly through the designated POST /v0/holder/credentials in JWT format.

This update allows users to upload their own credentials directly to UniCore securely. With this change, users can add and manage credentials that weren’t originally issued by UniCore, making it easier to integrate and use a variety of credentials within the platform.

Example:

POST /v0/holder/credentials HTTP/1.1
Host: "https://my-server.com"
Content-Type: application/json
Content-Length: 947

{
    "credential": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2dFODROQ01wTWVBeDlqSzljZjVXNEc4Z2NaOXh1d0p2RzFlN3dOazhLQ2d0I3o2TWtnRTg0TkNNcE1lQXg5aks5Y2Y1VzRHOGdjWjl4dXdKdkcxZTd3Tms4S0NndCJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtnRTg0TkNNcE1lQXg5aks5Y2Y1VzRHOGdjWjl4dXdKdkcxZTd3Tms4S0NndCIsInN1YiI6ImRpZDprZXk6ejZNa2lpZXlvTE1TVnNKQVp2N0pqZTV3V1NrREV5bVVna3lGOGtiY3JqWnBYM3FkIiwiZXhwIjo5OTk5OTk5OTk5LCJpYXQiOjAsInZjIjp7IkBjb250ZXh0IjoiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1raWlleW9MTVNWc0pBWnY3SmplNXdXU2tERXltVWdreUY4a2JjcmpacFgzcWQiLCJmaXJzdF9uYW1lIjoiRmVycmlzIiwibGFzdF9uYW1lIjoiUnVzdGFjZWFuIn0sImlzc3VlciI6ImRpZDprZXk6ejZNa2dFODROQ01wTWVBeDlqSzljZjVXNEc4Z2NaOXh1d0p2RzFlN3dOazhLQ2d0IiwiaXNzdWFuY2VEYXRlIjoiMjAxMC0wMS0wMVQwMDowMDowMFoifX0.d4QN73vDtZu79RP6GldHObu6rGsjidkLYp0XMRQNbNPY75LJoSv2iXk2Rz5M-VMBZGSU3YPZHytlrKBjxr1IBQ"
}

In a future improvement we should make sure that UniCore will/can validate the credential's schema and validity (related to #151)

Links to any relevant issues

n/a

How the change has been tested

Tested through updated Postman Collection (see Add signed Holder Credential request).

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully tested this change in a docker environment

@M-Adam-Hus
Copy link

@nanderstabel nanderstabel force-pushed the feat/presentation-by-value branch from ebdbeda to be9ca78 Compare December 10, 2024 00:20
@nanderstabel nanderstabel changed the base branch from feat/sd-jwt to beta December 10, 2024 00:20
@nanderstabel nanderstabel force-pushed the feat/presentation-by-value branch from be9ca78 to aa1620f Compare December 10, 2024 00:41
@nanderstabel nanderstabel self-assigned this Dec 10, 2024
@nanderstabel nanderstabel changed the title feat: create Presentations using raw Credentials feat: add POST method to /v0/holder/credentials Dec 10, 2024
@nanderstabel nanderstabel changed the title feat: add POST method to /v0/holder/credentials feat: add POST method to /v0/holder/credentials endpoint Dec 10, 2024
@nanderstabel nanderstabel added the Added A new feature that requires a minor release. label Dec 10, 2024
@nanderstabel nanderstabel marked this pull request as ready for review December 10, 2024 01:02
@nanderstabel nanderstabel changed the title feat: add POST method to /v0/holder/credentials endpoint feat: upload holder credentials via HTTP API Dec 12, 2024
@nanderstabel nanderstabel merged commit 8c8c246 into beta Dec 12, 2024
7 checks passed
@nanderstabel nanderstabel deleted the feat/presentation-by-value branch December 12, 2024 11:08
Copy link

🎉 This PR is included in version 1.0.0-beta.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added A new feature that requires a minor release. released on @beta
Projects
Development

Successfully merging this pull request may close these issues.

3 participants