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

fix: did:key app_authentication_key #153

Merged
merged 2 commits into from
Oct 27, 2023
Merged

Conversation

chris13524
Copy link
Member

Description

app_authentication_key should be a did:key as per the updated spec.

Resolves #152

How Has This Been Tested?

Automated tests

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@chris13524 chris13524 self-assigned this Oct 27, 2023
app_domain: sub.app_domain,
app_authentication_key: format!(
"did:key:{}",
DecodedClientId(decode_key(&sub.authentication_public_key)?)
Copy link

@Elyniss Elyniss Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something smells. It's not DecodedClientId, It's base58 encoded ED25519 key. Do we have tests for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same code for the other did:keys. DecodedClientId is a wrapper type containing the decoded public key. I'm then formatting it as string, which encodes it.

Added a test in 81e0c05

@chris13524 chris13524 requested a review from Elyniss October 27, 2023 13:05
@chris13524 chris13524 merged commit d9fd96c into main Oct 27, 2023
10 checks passed
@chris13524 chris13524 deleted the fix/appAuthenticationKey-didKey branch October 27, 2023 14:08
@Elyniss
Copy link

Elyniss commented Oct 27, 2023

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: did:key app_authentication_key
2 participants