Skip to content

Commit

Permalink
chore: remove useless jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 27, 2021
1 parent 493ce11 commit 35c6566
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
32 changes: 0 additions & 32 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,6 @@ class BaseClient {
return new TokenSet(params);
}

/**
* @name decryptIdToken
* @api private
*/
async decryptIdToken(token) {
if (!this.id_token_encrypted_response_alg) {
return token;
Expand Down Expand Up @@ -624,10 +620,6 @@ class BaseClient {
return this.validateJWT(body, expectedAlg, []);
}

/**
* @name decryptJARM
* @api private
*/
async decryptJARM(response) {
if (!this.authorization_encrypted_response_alg) {
return response;
Expand All @@ -639,10 +631,6 @@ class BaseClient {
return this.decryptJWE(response, expectedAlg, expectedEnc);
}

/**
* @name decryptJWTUserinfo
* @api private
*/
async decryptJWTUserinfo(body) {
if (!this.userinfo_encrypted_response_alg) {
return body;
Expand All @@ -654,10 +642,6 @@ class BaseClient {
return this.decryptJWE(body, expectedAlg, expectedEnc);
}

/**
* @name decryptJWE
* @api private
*/
async decryptJWE(jwe, expectedAlg, expectedEnc = 'A128CBC-HS256') {
const header = JSON.parse(base64url.decode(jwe.split('.')[0]));

Expand Down Expand Up @@ -702,10 +686,6 @@ class BaseClient {
return plaintext;
}

/**
* @name validateIdToken
* @api private
*/
async validateIdToken(tokenSet, nonce, returnedBy, maxAge, state) {
let idToken = tokenSet;

Expand Down Expand Up @@ -846,10 +826,6 @@ class BaseClient {
return tokenSet;
}

/**
* @name validateJWT
* @api private
*/
async validateJWT(jwt, expectedAlg, required = ['iss', 'sub', 'aud', 'exp', 'iat']) {
const isSelfIssued = this.issuer.issuer === 'https://self-issued.me';
const timestamp = now();
Expand Down Expand Up @@ -1241,10 +1217,6 @@ class BaseClient {
return parsed;
}

/**
* @name encryptionSecret
* @api private
*/
encryptionSecret(len) {
const hash = len <= 256 ? 'sha256' : len <= 384 ? 'sha384' : len <= 512 ? 'sha512' : false;
if (!hash) {
Expand All @@ -1258,10 +1230,6 @@ class BaseClient {
.slice(0, len / 8);
}

/**
* @name secretForAlg
* @api private
*/
secretForAlg(alg) {
if (!this.client_secret) {
throw new TypeError('client_secret is required');
Expand Down
4 changes: 0 additions & 4 deletions lib/passport_strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ function verified(err, user, info = {}) {
}
}

/**
* @name constructor
* @api public
*/
function OpenIDConnectStrategy(
{ client, params = {}, passReqToCallback = false, sessionKey, usePKCE = true, extras = {} } = {},
verify,
Expand Down
20 changes: 0 additions & 20 deletions lib/token_set.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,22 @@ const base64url = require('./helpers/base64url');
const now = require('./helpers/unix_timestamp');

class TokenSet {
/**
* @name constructor
* @api public
*/
constructor(values) {
Object.assign(this, values);
}

/**
* @name expires_in=
* @api public
*/
set expires_in(value) {
this.expires_at = now() + Number(value);
}

/**
* @name expires_in
* @api public
*/
get expires_in() {
return Math.max.apply(null, [this.expires_at - now(), 0]);
}

/**
* @name expired
* @api public
*/
expired() {
return this.expires_in === 0;
}

/**
* @name claims
* @api public
*/
claims() {
if (!this.id_token) {
throw new TypeError('id_token not present in TokenSet');
Expand Down

0 comments on commit 35c6566

Please sign in to comment.