Commit ef7ce6ee authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Include credential index in CredentialInfo

parent 90fc81d2
......@@ -19,6 +19,7 @@ type credential struct {
// CredentialInfo contains all information of an IRMA credential.
type CredentialInfo struct {
ID string // e.g., "irma-demo.RU.studentCard"
Index int // This is the Index-th credential instance of this type
SignedOn Timestamp // Unix timestamp
Expires Timestamp // Unix timestamp
Type *CredentialType // Credential information from ConfigurationStore
......
......@@ -35,7 +35,9 @@ func (cm *CredentialManager) CredentialInfoList() CredentialInfoList {
list := CredentialInfoList([]*CredentialInfo{})
for _, attrlistlist := range cm.attributes {
for _, attrlist := range attrlistlist {
for index, attrlist := range attrlistlist {
info := attrlist.Info()
info.Index = index
list = append(list, attrlist.Info())
}
}
......
Markdown is supported
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