Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding Support for Guardian factor settings endpoints #569

Merged
merged 5 commits into from
Jan 11, 2021

Conversation

JayHelton
Copy link
Contributor

@JayHelton JayHelton commented Jan 8, 2021

Changes

We are wanting to add support for the DUO and WebAuthn config settings through the SDK.

  • Endpoints added

    • GET /guardian/factors/:name/settings
    • PUT /guardian/factors/:name/settings
  • Classes and methods added, deleted, deprecated, or changed

    • management.guardian.updateFactorSettings
    • management.guardian.getFactorSettings
    • management.guardianUpdateFactorSettings
    • management.guardianGetFactorSettings

Testing

Pull the local branch, authenticate, and get a token using the SDK.
Call the getFactorSettings like so:

  management.guardian.getFactorSettings({ name: 'webauthn-roaming' }, function (err, settings) {
    console.log(settings);
  });

Ensure that the settings for the factor are returned.

Call the updateFactorSettings like so:

 management.guardian.updateFactorSettings(
  { name: 'webauthn-roaming' },
  { userVerification: 'discouraged', overrideRelyingParty: false },
  function (err, settings) {
   console.log(settings);
 });

Ensure that the setting is updated either through getting the config, or viewing it in the manage dashboard.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@JayHelton JayHelton marked this pull request as ready for review January 8, 2021 19:39
@JayHelton JayHelton requested a review from a team as a code owner January 8, 2021 19:39
Copy link
Contributor

@davidpatrick davidpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally there is also an alias method added to the management object (ie: https://github.com/auth0/node-auth0/blob/master/src/management/index.js#L2814-L2818)

@davidpatrick davidpatrick merged commit 09dec3e into auth0:master Jan 11, 2021
@davidpatrick davidpatrick added this to the v2.32.0 milestone Jan 11, 2021
@davidpatrick davidpatrick modified the milestones: v2.32.0, v2next Jan 21, 2021
@davidpatrick davidpatrick mentioned this pull request Jan 21, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants