Skip to content

Commit

Permalink
fix: document authentication methods values not correct
Browse files Browse the repository at this point in the history
  • Loading branch information
beatt83 committed May 19, 2024
1 parent 4e82ff4 commit ff175db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PeerDID/PeerDID/PeerDIDHelper+ResolveAlgo2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extension PeerDIDHelper {
return false
}

if case .agreement = type {
if case .authentication = type {
return true
}
return false
Expand Down
2 changes: 2 additions & 0 deletions Tests/PeerDIDTests/ResolvePeerDIDAlgo2Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ final class ReselvePeerDIDAlgo2Tests: XCTestCase {
XCTAssertTrue(encodedDocument.contains("\"id\":\"\(validDid)#key-3\""))
XCTAssertTrue(encodedDocument.contains("\"type\":\"Ed25519VerificationKey2020\""))
XCTAssertTrue(encodedDocument.contains("\"type\":\"X25519KeyAgreementKey2020\""))
XCTAssertEqual(document.authentication?.count, 2)
XCTAssertEqual(document.keyAgreement?.count, 1)
}

func testResolvePeerDIDAlgo2MultipleServices() throws {
Expand Down

0 comments on commit ff175db

Please sign in to comment.