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
e05b43e3
Commit
e05b43e3
authored
Apr 07, 2018
by
Sietse Ringers
Browse files
Remove hardcoded magic string in keyshare username auto-issuance
parent
e984652f
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmaclient/handlers.go
View file @
e05b43e3
...
...
@@ -19,8 +19,13 @@ var _ Handler = (*keyshareEnrollmentHandler)(nil)
// Session handlers in the order they are called
func
(
h
*
keyshareEnrollmentHandler
)
RequestIssuancePermission
(
request
irma
.
IssuanceRequest
,
ServerName
string
,
callback
PermissionHandler
)
{
h
.
kss
.
Username
=
request
.
Credentials
[
0
]
.
Attributes
[
"email"
]
// TODO magic string
// Fetch the username from the credential request and save it along with the scheme manager
smi
:=
request
.
Credentials
[
0
]
.
CredentialTypeID
.
IssuerIdentifier
()
.
SchemeManagerIdentifier
()
attr
:=
irma
.
NewAttributeTypeIdentifier
(
h
.
client
.
Configuration
.
SchemeManagers
[
smi
]
.
KeyshareAttribute
)
h
.
kss
.
Username
=
request
.
Credentials
[
0
]
.
Attributes
[
attr
.
Name
()]
h
.
client
.
storage
.
StoreKeyshareServers
(
h
.
client
.
keyshareServers
)
// Do the issuance
callback
(
true
,
nil
)
}
...
...
Write
Preview
Markdown
is supported
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