<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go/lib/paseto/paseto.go, branch dev</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=dev</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=dev'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2026-03-31T11:52:39Z</updated>
<entry>
<title>lib/paseto: move [Message.Unpack] to [v4.UnpackPublicToken]</title>
<updated>2026-03-31T11:52:39Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-03-31T11:52:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=5a1b6fd3753653b74577c7992b341a011a0ec416'/>
<id>urn:sha1:5a1b6fd3753653b74577c7992b341a011a0ec416</id>
<content type='text'>
Unpacking v4 public protocol on parent package seems wrong.
Only v4 package should know how to unpack it regarding the available
fields in the Message.
</content>
</entry>
<entry>
<title>lib/paseto: add unit tests for Payload and Message types</title>
<updated>2026-03-30T14:07:31Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-03-30T12:23:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=61a44bf239f5545080af83f890d488ceaf257a80'/>
<id>urn:sha1:61a44bf239f5545080af83f890d488ceaf257a80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/paseto: store the time as Unix epoch inside Payload</title>
<updated>2026-03-29T23:35:53Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-03-29T20:49:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=e931ffed0aada7427d7016ce681b2d038b668ba3'/>
<id>urn:sha1:e931ffed0aada7427d7016ce681b2d038b668ba3</id>
<content type='text'>
Previously, we use time.Time to store the value for ExpiredAt, NotBefore,
and IssuedAt.
Even thought this is allowed (see RFC 7519 section 2, NumericDate) but
it is not a standard practices.

This changes them to store Unix epoch with int64.
</content>
</entry>
<entry>
<title>lib/paseto: move message, payload, footer, and key type from v2</title>
<updated>2026-03-29T15:17:14Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-03-29T14:05:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=5335f8d5e049866c904b506e28a7e48c8c787024'/>
<id>urn:sha1:5335f8d5e049866c904b506e28a7e48c8c787024</id>
<content type='text'>
The [v2/PublicToken] has been moved and renamed as [paseto.Message].
The Data field in the Message is removed since its duplicate with
[Payload.Data].

The [v2/JSONToken] has been moved and renamed as [paseto.Payload].
In the [Payload.Validate] method, we remove the validation for IssuedAt
field, since its usage is to store the time the token is created.
The Data field type in the Payload changes from string to any.

The [v2/JSONFooter] has been moved and renamed as [paseto.Footer].
The type of Data field in Footer changes from map[string]any to any.
The KID field in the Footer has been renamed to PeerID along with its
json identifer.

The [v2/Key] has been moved and renamed as [paseto.Peer].
</content>
</entry>
<entry>
<title>lib/paseto: move implementation to sub directory "v2"</title>
<updated>2026-03-28T13:06:41Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-03-28T11:15:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=f3011a9cdfc59b72ce0203c48169e97d21235057'/>
<id>urn:sha1:f3011a9cdfc59b72ce0203c48169e97d21235057</id>
<content type='text'>
There are new versions of paseto standard: version 3 and version 4.
To minimize conflicts in the future, we move the old implementation of
paseto v2 to sub directory "v2" with package name "pasetov2".

The paseto package now left with common functions, like creating
pre-authentication encoding (PAE).
</content>
</entry>
<entry>
<title>all: use for-range with numeric</title>
<updated>2025-01-22T20:41:10Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-01-22T20:40:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=2a0694d2fa577574b505c4635eb8a824eaf88ddc'/>
<id>urn:sha1:2a0694d2fa577574b505c4635eb8a824eaf88ddc</id>
<content type='text'>
Go 1.22 now support for-range on numeric value.
</content>
</entry>
<entry>
<title>all: comply with linter recommendations #2</title>
<updated>2024-03-05T07:53:12Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-03-02T21:59:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=2fa7605727e90ca323b7b24168632e485d74c583'/>
<id>urn:sha1:2fa7605727e90ca323b7b24168632e485d74c583</id>
<content type='text'>
HTTP request now implicitly create request with context.

Any false positive related to not closing HTTP response body has been
annotated with "nolint:bodyclose".

In the example code, use consistent "// Output:" comment format, by
prefixing with single space.
Any comment on code now also prefixing with single space.

An error returned without variables now use [errors.New] instead of
[fmt.Errorf].
Any error returned using [fmt.Errorf] now wrapped using "%w" instead of
"%s".
Also, replace error checking using [errors.Is] or [errors.As], instead
of using equal/not-equal operator.

Any statement like "x = x OP y" now replaced with "x OP= y".
Also, swap statement is simplified using "x, y = y, x".
Any switch statement with single case now replaced with if-condition.

Any call to defer on function or program that call [os.Exit], now
replaced by calling the deferred function directly.

Any if-else condition now replaced with switch statement, if possible.
</content>
</entry>
<entry>
<title>lib/paseto: reformat the documentation</title>
<updated>2022-09-21T05:26:43Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-09-20T04:57:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=e95bd11ebde1517c7b209bd0684f51e320858c89'/>
<id>urn:sha1:e95bd11ebde1517c7b209bd0684f51e320858c89</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: reformat all codes using gofmt 1.19 (the Go tip)</title>
<updated>2022-05-09T14:54:02Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-05-09T14:54:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=0c9abc1a962955dd0b795a422958c5445145d54c'/>
<id>urn:sha1:0c9abc1a962955dd0b795a422958c5445145d54c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>paseto: replace le64() function with binary.Write()</title>
<updated>2021-04-22T03:25:07Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-04-22T03:25:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=a9f936aea6b2512e0af62ccacc50d89c194233d0'/>
<id>urn:sha1:a9f936aea6b2512e0af62ccacc50d89c194233d0</id>
<content type='text'>
The le64() return the string representation of uint64 in little endian,
which is basically binary.Write with parameter output buffer,
LittleEndian, and input value.
</content>
</entry>
</feed>
