Skip to content
GitLab
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
971f6373
Commit
971f6373
authored
Oct 04, 2017
by
Sietse Ringers
Browse files
Include credential logo when present in CredentialInfo
parent
78d71579
Changes
3
Hide whitespace changes
Inline
Side-by-side
credential.go
View file @
971f6373
...
...
@@ -5,6 +5,8 @@ import (
"math/big"
"fmt"
"github.com/mhe/gabi"
)
...
...
@@ -44,6 +46,15 @@ func NewCredentialInfo(ints []*big.Int, store *ConfigurationStore) *CredentialIn
attrs
[
i
]
=
TranslatedString
(
map
[
string
]
string
{
"en"
:
val
,
"nl"
:
val
})
}
path
:=
fmt
.
Sprintf
(
"%s/%s/%s/Issues/%s/logo.png"
,
store
.
path
,
credtype
.
SchemeManagerID
,
credtype
.
IssuerID
,
credtype
.
ID
)
exists
,
err
:=
PathExists
(
path
)
if
err
!=
nil
{
return
nil
}
if
!
exists
{
path
=
""
}
return
&
CredentialInfo
{
ID
:
credtype
.
Identifier
()
.
String
(),
SignedOn
:
Timestamp
(
meta
.
SigningDate
()),
...
...
@@ -52,7 +63,7 @@ func NewCredentialInfo(ints []*big.Int, store *ConfigurationStore) *CredentialIn
Issuer
:
store
.
Issuers
[
issid
],
SchemeManager
:
store
.
SchemeManagers
[
issid
.
SchemeManagerIdentifier
()],
Attributes
:
attrs
,
Logo
:
""
,
// TODO
Logo
:
path
,
Hash
:
NewAttributeListFromInts
(
ints
,
store
)
.
hash
(),
}
}
...
...
manager.go
View file @
971f6373
...
...
@@ -157,7 +157,7 @@ func (cm *CredentialManager) CredentialInfoList() CredentialInfoList {
for
index
,
attrlist
:=
range
attrlistlist
{
info
:=
attrlist
.
Info
()
info
.
Index
=
index
list
=
append
(
list
,
attrlist
.
I
nfo
()
)
list
=
append
(
list
,
i
nfo
)
}
}
...
...
testdata/irma_configuration/test/test/Issues/mijnirma/logo.png
0 → 100644
View file @
971f6373
14.8 KB
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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