File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ export class Verifier<T extends BaseClaims> {
3434 }
3535
3636 /**
37- * Static method to instantiate a Verifier class
37+ * Static method to instantiate a Verifier class from an existing token
38+ * This is useful when you wanna use the instance caching so public keys are cached
39+ * and the issuer url can be taken from the token
3840 * @param inputToken The input token you get from the request
39- * @param keysUrlPath The URL path to the public keys
41+ * @param keysUrlPath The path to the public keys json from the iss url
4042 * @param disableCaching Caches keys for 24 hours, defaults to false
4143 * @returns {Verifier } Returns an instance of Verifier class
4244 */
4345 public static fromToken < T extends BaseClaims > (
4446 inputToken : string ,
45- keysUrlPath : string ,
47+ keysUrlPath = ".well-known/jwks.json" ,
4648 disableCaching = false
4749 ) : Verifier < T > {
4850 const parsedToken = jwtDecode < T > ( this . getCleanedJwt ( inputToken ) ) ;
You can’t perform that action at this time.
0 commit comments