@@ -51,7 +51,7 @@ type Token struct {
5151 // The timestamp at which the Invocation becomes invalid
5252 expiration * time.Time
5353 // The timestamp at which the Invocation was created
54- invokedAt * time.Time
54+ issuedAt * time.Time
5555
5656 // An optional CID of the Receipt that enqueued the Task
5757 cause * cid.Cid
@@ -66,9 +66,9 @@ type Token struct {
6666// WithNonce or WithEmptyNonce options to specify provide your own nonce
6767// or to leave the nonce empty respectively.
6868//
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.
7272//
7373// With the exception of the WithMeta option, all others will overwrite
7474// 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
8585 proof : prf ,
8686 meta : meta .NewMeta (),
8787 nonce : nil ,
88- invokedAt : & iat ,
88+ issuedAt : & iat ,
8989 }
9090
9191 for _ , opt := range opts {
@@ -192,10 +192,10 @@ func (t *Token) Expiration() *time.Time {
192192 return t .expiration
193193}
194194
195- // InvokedAt returns the time.Time at which the invocation token was
195+ // IssuedAt returns the time.Time at which the invocation token was
196196// created.
197- func (t * Token ) InvokedAt () * time.Time {
198- return t .invokedAt
197+ func (t * Token ) IssuedAt () * time.Time {
198+ return t .issuedAt
199199}
200200
201201// Cause returns the Token's (optional) cause field which may specify
@@ -231,7 +231,7 @@ func (t *Token) String() string {
231231 res .WriteString (fmt .Sprintf ("Nonce: %s\n " , base64 .StdEncoding .EncodeToString (t .Nonce ())))
232232 res .WriteString (fmt .Sprintf ("Meta: %s\n " , t .Meta ()))
233233 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 ()))
235235 res .WriteString (fmt .Sprintf ("Cause: %v" , t .Cause ()))
236236
237237 return res .String ()
@@ -313,9 +313,9 @@ func tokenFromModel(m tokenPayloadModel) (*Token, error) {
313313 return nil , fmt .Errorf ("parse expiration: %w" , err )
314314 }
315315
316- tkn .invokedAt , err = parse .OptionalTimestamp (m .Iat )
316+ tkn .issuedAt , err = parse .OptionalTimestamp (m .Iat )
317317 if err != nil {
318- return nil , fmt .Errorf ("parse invokedAt : %w" , err )
318+ return nil , fmt .Errorf ("parse IssuedAt : %w" , err )
319319 }
320320
321321 tkn .cause = m .Cause
0 commit comments