You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/issuer/lib/VcIssuer.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,8 @@ import {
66
66
CredentialSignerCallback
67
67
}from'./types'
68
68
69
+
importuuidfrom'short-uuid'
70
+
69
71
import{LOG}from'./index'
70
72
71
73
exportclassVcIssuer<DIDDocextendsobject>{
@@ -228,12 +230,14 @@ export class VcIssuer<DIDDoc extends object> {
228
230
if(!this.uris){
229
231
throwError('No URI state manager set, whilst apparently credential offer URIs are being used')
230
232
}
231
-
credentialOfferObject.credential_offer_uri=opts.credentialOfferUri??`${issuerPayloadUri}?id=${preAuthorizedCode}`// TODO how is this going to work with auth code flow?
233
+
constcredentialOfferCorrelationId=uuid.uuid()// TODO allow to be supplied
234
+
credentialOfferObject.credential_offer_uri=opts.credentialOfferUri??`${issuerPayloadUri}/${credentialOfferCorrelationId}`// TODO how is this going to work with auth code flow?
issuerState?: string;//todo: Probably good to hash it here, since it would come in from the client and we could match the hash and thus use the client value
44
44
preAuthorizedCode?: string;//todo: Probably good to hash it here, since it would come in from the client and we could match the hash and thus use the client value
45
45
uri: string;//todo: Probably good to hash it here, since it would come in from the client and we could match the hash and thus use the client value
0 commit comments