JwtService
Defined in: packages/auth/src/jwt/jwt.service.ts:104
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new JwtService(
options):JwtService
Defined in: packages/auth/src/jwt/jwt.service.ts:109
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”JwtService
Accessors
Section titled “Accessors”tokenLifetimeSeconds
Section titled “tokenLifetimeSeconds”Get Signature
Section titled “Get Signature”get tokenLifetimeSeconds():
number
Defined in: packages/auth/src/jwt/jwt.service.ts:119
Lifetime of issued tokens, in seconds.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”issue()
Section titled “issue()”issue(
input,issuedAt?):string
Defined in: packages/auth/src/jwt/jwt.service.ts:128
Issue a signed token for the given principal.
Parameters
Section titled “Parameters”issuedAt?
Section titled “issuedAt?”number = ...
Returns
Section titled “Returns”string
issueWithClaims()
Section titled “issueWithClaims()”issueWithClaims(
input,issuedAt?):object
Defined in: packages/auth/src/jwt/jwt.service.ts:137
Issue a signed token and also return its claims, so callers can bind the
minted jti/exp to server-side state (e.g. a session, for revocation on
logout) without re-verifying the token they just produced.
Parameters
Section titled “Parameters”issuedAt?
Section titled “issuedAt?”number = ...
Returns
Section titled “Returns”object
claims
Section titled “claims”claims:
JwtClaims
token:
string
verify()
Section titled “verify()”verify(
token,atSeconds?):JwtClaims
Defined in: packages/auth/src/jwt/jwt.service.ts:169
Verify a token and return its claims, or throw JwtError.
Validation order is signature → structure → issuer → expiry so that a tampered token never reaches claim parsing.
Parameters
Section titled “Parameters”string
atSeconds?
Section titled “atSeconds?”number = ...