Commit 8f3aac87 authored by David Venhoek's avatar David Venhoek
Browse files

Generate a list of credentials that will be removed on accepting issuance requests.

parent 4d97255d
......@@ -349,6 +349,10 @@ func (session *session) start() {
return
}
ir.CredentialInfoList = append(ir.CredentialInfoList, info)
preexistingCredentials := session.client.attrs(*credreq.CredentialTypeID)
if len(preexistingCredentials) != 0 && preexistingCredentials[0].IsValid() && preexistingCredentials[0].CredentialType().IsSingleton {
ir.RemovalCredentialInfoList = append(ir.RemovalCredentialInfoList, preexistingCredentials[0].Info())
}
}
}
......
......@@ -66,9 +66,10 @@ type SignatureRequest struct {
// optionally also asking for certain attributes to be simultaneously disclosed.
type IssuanceRequest struct {
SessionRequest
Credentials []*CredentialRequest `json:"credentials"`
Disclose AttributeDisjunctionList `json:"disclose"`
CredentialInfoList CredentialInfoList `json:",omitempty"`
Credentials []*CredentialRequest `json:"credentials"`
Disclose AttributeDisjunctionList `json:"disclose"`
CredentialInfoList CredentialInfoList `json:",omitempty"`
RemovalCredentialInfoList CredentialInfoList `json:",omitempty"`
}
// A CredentialRequest contains the attributes and metadata of a credential
......
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