essentialkaos / branca

Authenticated encrypted API tokens (IETF XChaCha20-Poly1305 AEAD) for Golang

Home Page:https://kaos.sh/g/branca.v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IsExpired Refactor

TheYkk opened this issue · comments

Hi, I strongly disagree of attaching IsExpired function to branca instance. The general usage of IsExpired is tied to the token and it should be the sub function of Token struct. So that we don't need to set global ttl for branca instance and we can separately verify the expiration of token