Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add MFA Authentication policies to GuardianEntity #379

Merged
merged 7 commits into from
Oct 5, 2021

Conversation

pelletier197
Copy link
Contributor

@pelletier197 pelletier197 commented Oct 2, 2021

Changes

I added the endpoints for that were missing. This is kind of required to enable the MFA for your application.

Testing

AuthAPI auth = new AuthAPI("<>", "<>", "<>");
ManagementAPI api = new ManagementAPI("<>", auth.requestToken("<>").execute().getAccessToken());

System.out.println(api.guardian().getAuthenticationPolicies().execute());
System.out.println(api.guardian().updateAuthenticationPolicies(Arrays.asList("all-applications")).execute());
System.out.println(api.guardian().getAuthenticationPolicies().execute());
System.out.println(api.guardian().updateAuthenticationPolicies(Arrays.asList()).execute());
System.out.println(api.guardian().getAuthenticationPolicies().execute());

outputs

[]
[all-applications]
[all-applications]
[]
[]

Putting the value to all-applications produces the following
image

Checklist

@pelletier197 pelletier197 requested a review from a team as a code owner October 2, 2021 15:59
Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! I'll leave the doc change for a later PR.

/**
* Updates Guardian's MFA authentication policies. A token with scope update:mfa_policies is needed.
*
* @return a Request to execute
Copy link
Contributor

Choose a reason for hiding this comment

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

missing parameter annotation

@lbalmaceda lbalmaceda added this to the v1-Next milestone Oct 4, 2021
@lbalmaceda lbalmaceda linked an issue Oct 4, 2021 that may be closed by this pull request
@lbalmaceda lbalmaceda merged commit 297980f into auth0:master Oct 5, 2021
@lbalmaceda lbalmaceda modified the milestones: v1-Next, 1.35.0 Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MFA authentication policies endpoint support
2 participants