Fix ob3 tests
- Update context URL (imsglobal.github.io no longer exists) - Update simple* resources with updated ob3 spec example json
This commit is contained in:
parent
1b1e58bde1
commit
bd106f9761
@ -61,12 +61,12 @@ public class ContextPropertyProbe extends Probe<JsonNode> {
|
||||
private final static Map<Set<Credential.Type>, List<String>> values = new ImmutableMap.Builder<Set<Credential.Type>, List<String>>()
|
||||
.put(Set.of(OpenBadgeCredential, AchievementCredential, EndorsementCredential),
|
||||
List.of("https://www.w3.org/2018/credentials/v1",
|
||||
//"https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
|
||||
//"https://purl.imsglobal.org/spec/ob/v3p0/context.json")) //dev legacy
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
|
||||
.put(Set.of(ClrCredential),
|
||||
List.of("https://www.w3.org/2018/credentials/v1",
|
||||
// "https://dc.imsglobal.org/draft/clr/v2p0/context", //dev legacy
|
||||
// "https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
|
||||
// "https://purl.imsglobal.org/spec/ob/v3p0/context.json")) //dev legacy
|
||||
"https://purl.imsglobal.org/spec/clr/v2p0/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
|
||||
|
||||
|
@ -128,7 +128,7 @@ public class EmbeddedProofProbe extends Probe<Credential> {
|
||||
return error("Verification method does not contain an Ed25519 public key", ctx);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return fatal("Invalid public key: " + e.getMessage(), ctx);
|
||||
return error("Invalid public key: " + e.getMessage(), ctx);
|
||||
}
|
||||
|
||||
if (controller != null) {
|
||||
|
@ -43,7 +43,7 @@ public class CachingDocumentLoader implements DocumentLoader {
|
||||
.put("https://purl.imsglobal.org/spec/clr/v2p0/context.json",Resources.getResource("contexts/clr-v2p0.json"))
|
||||
.put("https://purl.imsglobal.org/spec/ob/v3p0/context.json",Resources.getResource("contexts/ob-v3p0.json"))
|
||||
.put("https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",Resources.getResource("contexts/ob-v3p0-extensions.json"))
|
||||
.put("https://imsglobal.github.io/openbadges-specification/context.json",Resources.getResource("contexts/obv3x.jsonld"))
|
||||
.put("https://purl.imsglobal.org/spec/ob/v3p0/context.json",Resources.getResource("contexts/obv3x.jsonld"))
|
||||
.put("https://www.w3.org/ns/did/v1", Resources.getResource("contexts/did-v1.jsonld"))
|
||||
.put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld"))
|
||||
.put("https://w3id.org/security/suites/ed25519-2020/v1",Resources.getResource("contexts/security-suites-ed25519-2020-v1.jsonld"))
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://1edtech.edu/credentials/3732",
|
||||
@ -93,7 +93,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"type": [
|
||||
@ -147,7 +147,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"type": [
|
||||
@ -253,7 +253,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"type": [
|
||||
@ -500,7 +500,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"type": [
|
||||
@ -588,7 +588,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"type": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
|
@ -1,37 +1,48 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
"id": "http://example.com/credentials/3527",
|
||||
"type": [
|
||||
"VerifiableCredential",
|
||||
"OpenBadgeCredential"
|
||||
],
|
||||
"issuer": {
|
||||
"id": "https://example.edu/issuers/565049",
|
||||
"id": "https://example.com/issuers/876543",
|
||||
"type": [
|
||||
"Profile"
|
||||
],
|
||||
"name": "Example University"
|
||||
"name": "Example Corp"
|
||||
},
|
||||
"issuanceDate": "2010-01-01T00:00:00Z",
|
||||
"expirationDate": "2020-01-20T00:00:00Z",
|
||||
"name": "Example University Degree",
|
||||
"expirationDate": "2010-01-01T00:00:00Z",
|
||||
"name": "Teamwork Badge",
|
||||
"credentialSubject": {
|
||||
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
|
||||
"type": [
|
||||
"AchievementSubject"
|
||||
]
|
||||
],
|
||||
"achievement": {
|
||||
"id": "https://example.com/achievements/21st-century-skills/teamwork",
|
||||
"type": [
|
||||
"Achievement"
|
||||
],
|
||||
"criteria": {
|
||||
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management."
|
||||
},
|
||||
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
|
||||
"name": "Teamwork"
|
||||
}
|
||||
},
|
||||
"proof": [
|
||||
{
|
||||
"type": "Ed25519Signature2020",
|
||||
"created": "2022-06-28T16:28:36Z",
|
||||
"verificationMethod": "did:key:z6MkkUD3J14nkYzn46QeuaVSnp7dF85QJKwKvJvfsjx79aXj",
|
||||
"created": "2022-11-16T18:54:22Z",
|
||||
"verificationMethod": "https://example.com/issuers/876543#z6MknNHHrBzPytzu6CUBP9Lg7fg4KSBjzimc2Frh693YbMiv",
|
||||
"proofPurpose": "assertionMethod",
|
||||
"proofValue": "z3MUt2ZuU8Byqivxh6GphEM65AFYyNaGYibm97xLTafM7uGufZQLKvJR8itZwxKskvtFM3CUty46v26DZidMNoQnM"
|
||||
"proofValue": "z5gJZKchSJEYPGeq6bsqiLKuxT6mXqAovPbqYX66CB7u9CSNFdV41vHtysjHFiitvoyhfPxsaZnWftrZZZW2txPQK"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
@ -7,48 +7,46 @@
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584",
|
||||
"id": "http://example.com/credentials/3527",
|
||||
"type": [
|
||||
"VerifiableCredential",
|
||||
"AchievementCredential"
|
||||
"OpenBadgeCredential"
|
||||
],
|
||||
"issuer": {
|
||||
"id": "https://example.com/issuers/876543",
|
||||
"type": [
|
||||
"Profile"
|
||||
],
|
||||
"name": "Andy F. Miller",
|
||||
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164"
|
||||
"name": "Example Corp"
|
||||
},
|
||||
"issuanceDate": "2022-11-10T07:38:00-08:00",
|
||||
"name": "test 1",
|
||||
"issuanceDate": "2010-01-01T00:00:00Z",
|
||||
"name": "Teamwork Badge",
|
||||
"credentialSubject": {
|
||||
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164",
|
||||
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
|
||||
"type": [
|
||||
"AchievementSubject"
|
||||
],
|
||||
"achievement": {
|
||||
"id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510",
|
||||
"id": "https://example.com/achievements/21st-century-skills/teamwork",
|
||||
"type": [
|
||||
"Achievement"
|
||||
],
|
||||
"achievementType": "Achievement",
|
||||
"name": "test 1",
|
||||
"description": "This is a test achievement",
|
||||
"criteria": {
|
||||
"narrative": "There is no criteria"
|
||||
}
|
||||
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management."
|
||||
},
|
||||
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
|
||||
"name": "Teamwork"
|
||||
}
|
||||
},
|
||||
"proof": [
|
||||
{
|
||||
"type": "Ed25519Signature2020",
|
||||
"created": "2022-11-10T19:36:07Z",
|
||||
"created": "2022-11-16T18:54:22Z",
|
||||
"verificationMethod": "https://example.com/issuers/876543#z6MknNHHrBzPytzu6CUBP9Lg7fg4KSBjzimc2Frh693YbMiv",
|
||||
"proofPurpose": "assertionMethod",
|
||||
"verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5",
|
||||
"proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD"
|
||||
"proofValue": "z5gJZKchSJEYPGeq6bsqiLKuxT6mXqAovPbqYX66CB7u9CSNFdV41vHtysjHFiitvoyhfPxsaZnWftrZZZW2txPQK"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://imsglobal.github.io/openbadges-specification/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "http://example.edu/credentials/3732",
|
||||
|
@ -2,48 +2,46 @@
|
||||
"@context": [
|
||||
"https://www.w3.org/2018/credentials/v1",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
|
||||
"https://purl.imsglobal.org/spec/ob/v3p0/extensions.json",
|
||||
"https://w3id.org/security/suites/ed25519-2020/v1"
|
||||
],
|
||||
"id": "urn:uuid:280c19b6-9680-4a37-ba84-e38b1a4e4584",
|
||||
"id": "http://example.com/credentials/3527",
|
||||
"type": [
|
||||
"VerifiableCredential",
|
||||
"AchievementCredential"
|
||||
"OpenBadgeCredential"
|
||||
],
|
||||
"issuer": {
|
||||
"id": "https://example.com/issuers/876543",
|
||||
"type": [
|
||||
"Profile"
|
||||
],
|
||||
"name": "Andy F. Miller",
|
||||
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164"
|
||||
"name": "Example Corp"
|
||||
},
|
||||
"issuanceDate": "2022-11-10T07:38:00-08:00",
|
||||
"name": "test 1",
|
||||
"issuanceDate": "2010-01-01T00:00:00Z",
|
||||
"name": "Teamwork Badge",
|
||||
"credentialSubject": {
|
||||
"id": "urn:uuid:6f2e33e5-7a29-4155-840a-59483ba10164",
|
||||
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
|
||||
"type": [
|
||||
"AchievementSubject"
|
||||
],
|
||||
"achievement": {
|
||||
"id": "urn:uuid:35258e6f-4c05-4215-8ada-38a5a5b80510",
|
||||
"id": "https://example.com/achievements/21st-century-skills/teamwork",
|
||||
"type": [
|
||||
"Achievement"
|
||||
],
|
||||
"achievementType": "Achievement",
|
||||
"name": "test 1",
|
||||
"description": "This is a test achievement",
|
||||
"criteria": {
|
||||
"narrative": "There is no criteria"
|
||||
}
|
||||
"narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management."
|
||||
},
|
||||
"description": "This badge recognizes the development of the capacity to collaborate within a group environment.",
|
||||
"name": "Teamwork"
|
||||
}
|
||||
},
|
||||
"proof": [
|
||||
{
|
||||
"type": "Ed25519Signature2020",
|
||||
"created": "2022-11-10T19:36:07Z",
|
||||
"created": "2022-11-16T18:54:22Z",
|
||||
"verificationMethod": "https://example.com/issuers/876543#z6MknNHHrBzPytzu6CUBP9Lg7fg4KSBjzimc2Frh693YbMiv",
|
||||
"proofPurpose": "assertionMethod",
|
||||
"verificationMethod": "z6Mkt5PKegVQUpjQjoeiqkFa1HqpvMvehiLJuPMJcqX9hxM5",
|
||||
"proofValue": "z4xh7M5Xpo4hU2bDU6dtQZgnuJCtJUhYCsMPBbCnhAvdnugDidH8anMJ6ayt7vR74iL5mhgJgTDQnNHoYrCnhARVD"
|
||||
"proofValue": "z5gJZKchSJEYPGeq6bsqiLKuxT6mXqAovPbqYX66CB7u9CSNFdV41vHtysjHFiitvoyhfPxsaZnWftrZZZW2txPQK"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user