@hemia/jwt-manager 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5935,15 +5935,13 @@ class JwtManager extends Mixin {
5935
5935
  if (!claims.sub) {
5936
5936
  throw new Error('sub (subject) claim is required for ID tokens');
5937
5937
  }
5938
- const payload = Object.assign(Object.assign({}, claims), { iss: this._issuer, aud: this._audience, iat: Math.floor(Date.now() / 1000) });
5938
+ const payload = Object.assign(Object.assign({}, claims), { iat: Math.floor(Date.now() / 1000) });
5939
5939
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || jwtConfig.expiresIn, { issuer: this._issuer, audience: this._audience });
5940
5940
  }
5941
5941
  createAccessToken(sub, scopes, secretKey, expiresIn) {
5942
5942
  const payload = {
5943
5943
  sub,
5944
5944
  scope: scopes.join(' '),
5945
- iss: this._issuer,
5946
- aud: this._audience,
5947
5945
  iat: Math.floor(Date.now() / 1000),
5948
5946
  };
5949
5947
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || '15m', { issuer: this._issuer, audience: this._audience });
@@ -5952,8 +5950,6 @@ class JwtManager extends Mixin {
5952
5950
  const payload = {
5953
5951
  sub,
5954
5952
  type: 'refresh',
5955
- iss: this._issuer,
5956
- aud: this._audience,
5957
5953
  iat: Math.floor(Date.now() / 1000),
5958
5954
  };
5959
5955
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || '30d', {
@@ -5937,15 +5937,13 @@ class JwtManager extends Mixin {
5937
5937
  if (!claims.sub) {
5938
5938
  throw new Error('sub (subject) claim is required for ID tokens');
5939
5939
  }
5940
- const payload = Object.assign(Object.assign({}, claims), { iss: this._issuer, aud: this._audience, iat: Math.floor(Date.now() / 1000) });
5940
+ const payload = Object.assign(Object.assign({}, claims), { iat: Math.floor(Date.now() / 1000) });
5941
5941
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || jwtConfig.expiresIn, { issuer: this._issuer, audience: this._audience });
5942
5942
  }
5943
5943
  createAccessToken(sub, scopes, secretKey, expiresIn) {
5944
5944
  const payload = {
5945
5945
  sub,
5946
5946
  scope: scopes.join(' '),
5947
- iss: this._issuer,
5948
- aud: this._audience,
5949
5947
  iat: Math.floor(Date.now() / 1000),
5950
5948
  };
5951
5949
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || '15m', { issuer: this._issuer, audience: this._audience });
@@ -5954,8 +5952,6 @@ class JwtManager extends Mixin {
5954
5952
  const payload = {
5955
5953
  sub,
5956
5954
  type: 'refresh',
5957
- iss: this._issuer,
5958
- aud: this._audience,
5959
5955
  iat: Math.floor(Date.now() / 1000),
5960
5956
  };
5961
5957
  return this.createBasicToken(payload, secretKey || this._secretKey, expiresIn || '30d', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemia/jwt-manager",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Gestor de JWT seguro y extensible para aplicaciones Node.js",
5
5
  "main": "dist/hemia-jwt-manager.js",
6
6
  "module": "dist/hemia-jwt-manager.esm.js",