Skip to content

Commit

Permalink
feat: add a Client static validate() method
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 13, 2024
1 parent a7e73fa commit d1f7d73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/models/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,14 @@ export default function getClient(provider) {
return this.postLogoutRedirectUris.includes(uri);
}

static async validate(metadata) {
const client = new Client(metadata);

if (client.sectorIdentifierUri !== undefined) {
await sectorValidate(client);
}
}

metadata() {
return mapKeys(this, (value, key) => {
const snaked = snakeCase(key);
Expand Down

0 comments on commit d1f7d73

Please sign in to comment.