Skip to content

Commit

Permalink
chore: rename properties to metadata in Client.register()
Browse files Browse the repository at this point in the history
  • Loading branch information
svvac committed Feb 27, 2020
1 parent eb0c385 commit 30a41d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1393,22 +1393,22 @@ module.exports = (issuer, aadIssValidation = false) => class Client extends Base
* @name register
* @api public
*/
static async register(properties, options = {}) {
static async register(metadata, options = {}) {
const { initialAccessToken, jwks, ...clientOptions } = options;

assertIssuerConfiguration(this.issuer, 'registration_endpoint');

if (jwks !== undefined && !(properties.jwks || properties.jwks_uri)) {
if (jwks !== undefined && !(metadata.jwks || metadata.jwks_uri)) {
const keystore = getKeystore.call(this, jwks);
properties.jwks = keystore.toJWKS(false);
metadata.jwks = keystore.toJWKS(false);
}

const response = await request.call(this, {
headers: initialAccessToken ? {
Authorization: authorizationHeaderValue(initialAccessToken),
} : undefined,
json: true,
body: properties,
body: metadata,
url: this.issuer.registration_endpoint,
method: 'POST',
});
Expand Down

0 comments on commit 30a41d1

Please sign in to comment.