Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
9fcc666b
Commit
9fcc666b
authored
Jun 15, 2018
by
Sietse Ringers
Browse files
Fix and test no-attribute disclosures
parent
dfd0e987
Changes
2
Hide whitespace changes
Inline
Side-by-side
identifiers.go
View file @
9fcc666b
...
...
@@ -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
())
}
...
...
irmaclient/session_test.go
View file @
9fcc666b
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment