Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / verifyToken

Function: verifyToken()

ts
function verifyToken(
   rawToken, 
   options, 
ctx?): Promise<VerifyResult>;

Defined in: packages/security/src/auth/verify.ts:371

Functional convenience wrapper around TokenVerifier#verify. The stateless variant constructs a one-shot verifier per call and is only suitable for tests; production code holds a long-lived TokenVerifier so the warm cache earns its keep.

Parameters

ParameterType
rawTokenstring
optionsVerifierOptions
ctx?VerifyContext

Returns

Promise&lt;VerifyResult&gt;

Stable