diff --git a/lib/token-types/bearer-token-type.js b/lib/token-types/bearer-token-type.js index 373d8731..a0c836aa 100644 --- a/lib/token-types/bearer-token-type.js +++ b/lib/token-types/bearer-token-type.js @@ -57,11 +57,9 @@ class BearerTokenType { object.scope = this.scope; } - for (const key in this.customAttributes) { - if ( Object.prototype.hasOwnProperty.call(this.customAttributes, key) ) { - object[key] = this.customAttributes[key]; - } - } + Object.keys(this.customAttributes).forEach((key) => { + object[key] = this.customAttributes[key]; + }); return object; } }