@@ -51,7 +51,7 @@ type Token struct {
51
51
// The timestamp at which the Invocation becomes invalid
52
52
expiration * time.Time
53
53
// The timestamp at which the Invocation was created
54
- invokedAt * time.Time
54
+ issuedAt * time.Time
55
55
56
56
// An optional CID of the Receipt that enqueued the Task
57
57
cause * cid.Cid
@@ -66,9 +66,9 @@ type Token struct {
66
66
// WithNonce or WithEmptyNonce options to specify provide your own nonce
67
67
// or to leave the nonce empty respectively.
68
68
//
69
- // If no invokedAt is provided, the current time is used. Use the
70
- // WithInvokedAt or WithInvokedAtIn Options to specify a different time
71
- // or the WithoutInvokedAt Option to clear the Token's invokedAt field.
69
+ // If no IssuedAt is provided, the current time is used. Use the
70
+ // IssuedAt or WithIssuedAtIn Options to specify a different time
71
+ // or the WithoutIssuedAt Option to clear the Token's IssuedAt field.
72
72
//
73
73
// With the exception of the WithMeta option, all others will overwrite
74
74
// the previous contents of their target field.
@@ -85,7 +85,7 @@ func New(iss did.DID, cmd command.Command, sub did.DID, prf []cid.Cid, opts ...O
85
85
proof : prf ,
86
86
meta : meta .NewMeta (),
87
87
nonce : nil ,
88
- invokedAt : & iat ,
88
+ issuedAt : & iat ,
89
89
}
90
90
91
91
for _ , opt := range opts {
@@ -192,10 +192,10 @@ func (t *Token) Expiration() *time.Time {
192
192
return t .expiration
193
193
}
194
194
195
- // InvokedAt returns the time.Time at which the invocation token was
195
+ // IssuedAt returns the time.Time at which the invocation token was
196
196
// created.
197
- func (t * Token ) InvokedAt () * time.Time {
198
- return t .invokedAt
197
+ func (t * Token ) IssuedAt () * time.Time {
198
+ return t .issuedAt
199
199
}
200
200
201
201
// Cause returns the Token's (optional) cause field which may specify
@@ -231,7 +231,7 @@ func (t *Token) String() string {
231
231
res .WriteString (fmt .Sprintf ("Nonce: %s\n " , base64 .StdEncoding .EncodeToString (t .Nonce ())))
232
232
res .WriteString (fmt .Sprintf ("Meta: %s\n " , t .Meta ()))
233
233
res .WriteString (fmt .Sprintf ("Expiration: %v\n " , t .Expiration ()))
234
- res .WriteString (fmt .Sprintf ("Invoked At: %v\n " , t .InvokedAt ()))
234
+ res .WriteString (fmt .Sprintf ("Issued At: %v\n " , t .IssuedAt ()))
235
235
res .WriteString (fmt .Sprintf ("Cause: %v" , t .Cause ()))
236
236
237
237
return res .String ()
@@ -313,9 +313,9 @@ func tokenFromModel(m tokenPayloadModel) (*Token, error) {
313
313
return nil , fmt .Errorf ("parse expiration: %w" , err )
314
314
}
315
315
316
- tkn .invokedAt , err = parse .OptionalTimestamp (m .Iat )
316
+ tkn .issuedAt , err = parse .OptionalTimestamp (m .Iat )
317
317
if err != nil {
318
- return nil , fmt .Errorf ("parse invokedAt : %w" , err )
318
+ return nil , fmt .Errorf ("parse IssuedAt : %w" , err )
319
319
}
320
320
321
321
tkn .cause = m .Cause
0 commit comments