Commit 9fcc666b authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Fix and test no-attribute disclosures

parent dfd0e987
......@@ -111,6 +111,9 @@ func (id CredentialTypeIdentifier) IssuerIdentifier() IssuerIdentifier {
// CredentialTypeIdentifier returns the CredentialTypeIdentifier of the attribute identifier.
func (id AttributeTypeIdentifier) CredentialTypeIdentifier() CredentialTypeIdentifier {
if id.IsCredential() {
return NewCredentialTypeIdentifier(id.String())
}
return NewCredentialTypeIdentifier(id.Parent())
}
......
......@@ -211,6 +211,14 @@ func TestDisclosureSession(t *testing.T) {
sessionHelper(t, jwtcontents, "verification", nil)
}
func TestNoAttributeDisclosureSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard")
name := "testsp"
jwtcontents := getDisclosureJwt(name, id)
sessionHelper(t, jwtcontents, "verification", nil)
}
func TestIssuanceSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard.studentID")
name := "testip"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment