src/Token.ts
File Token.ts
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Embassy
* Copyright (c) 2017-2021 Tom Shawver
*/
Function sign
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async sign(kid: string, opts: TokenSigningOptions = {}): Promise<string> {
if (!opts.subject && !this.claims.sub) {
throw new Error('A subject is required to sign this token')
}
this.encodeBlobs()