meta: make a read-only version to enforce token immutability

This commit is contained in:
Michael Muré
2024-11-06 15:17:35 +01:00
parent cfb4446a05
commit 6aeb6a8b70
5 changed files with 54 additions and 8 deletions

View File

@@ -71,8 +71,8 @@ func (t *Token) Nonce() []byte {
}
// Meta returns the Token's metadata.
func (t *Token) Meta() *meta.Meta {
return t.meta
func (t *Token) Meta() meta.ReadOnly {
return t.meta.ReadOnly()
}
// Expiration returns the time at which the Token expires.