-
Notifications
You must be signed in to change notification settings - Fork 3
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: add credential_offer_uri
as default
#166
base: beta
Are you sure you want to change the base?
Conversation
let credential_offer_by_value_enabled = config().credential_offer_by_value_enabled.unwrap_or_default(); | ||
let form_url_encoded_credential_offer = if credential_offer_by_value_enabled { | ||
// offer by/value is enabled, use credential_offer | ||
self.credential_offer | ||
.as_ref() | ||
.ok_or(MissingCredentialOfferError)? | ||
.to_string() | ||
} else { | ||
// default: use credential_offer_uri | ||
self.credential_offer_uri | ||
.as_ref() | ||
.ok_or(MissingCredentialOfferError)? | ||
.to_string() | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes total sense that you the same method to construct the form_url_encoded_credential_offer
here as well! However, seeing this makes me think that 'recreating' the form_url_encoded_credential_offer
here was not really a good idea in the first place.
We should probably discuss this further in a call, but my idea improve this is as follows:
- We get rid of the
CreateFormUrlEncodedCredentialOffer
command - We keep the
FormUrlEncodedCredentialOfferCreated
event the way you updated it, but we add it to theCreateCredentialOffer
command. SoCreateCredentialOffer
will result in two events:CredentialOfferCreated
andFormUrlEncodedCredentialOfferCreated
. - In
SendCredentialOffer
we can simply assume thatself.form_url_encoded_credential_offer
contains theform_url_encoded_credential_offer
string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of tests related to IotaRms
are currently failing because of the discontinuation of the did:iota:rms
DID Method (see #167) so this is unrelated to your PR. I will fix that problem in a separate PR so this problem will resolve itself eventually 👍
Please enter a commit message to explain why this merge is necessary, the cojfit.
More details for updating the Postman Collection: Current test script flow in the Postman Collection (Credential Offer by Value)
Desired test script flow:
|
Description of change
Updates
CreateCredentialOffer
handler to default offer creations to by reference as opposed to by value.Links to any relevant issues
Fixes issue #165
How the change has been tested
cargo test, some tests still failing - being worked on.
Definition of Done checklist
Add an
x
to the boxes that are relevant to your changes.