Skip to content

2.3.0

Latest

Choose a tag to compare

@masterix21 masterix21 released this 13 Oct 13:23
ccbbb11

Added

  • Application claims in offline tokens. TokenIssuer::issue() accepts a
    claims option: an associative array of your own claims (a module name, a
    plan, server-computed limits, dates that follow your business rules) that is
    signed together with the package claims, so a client can trust them offline.
    Package and PASETO claims are reserved: trying to override one, or passing
    claims without a name, throws InvalidArgumentException. They come back
    from verify(), verifyOffline() and extractClaims().
    refresh() does not carry application claims over: pass them again in its
    options when needed. See "Application Claims" in
    docs/features/offline-verification.md.