Skip to content

Add MFA Authentication policies to GuardianEntity#379

Merged
lbalmaceda merged 7 commits intoauth0:masterfrom
pelletier197:master
Oct 5, 2021
Merged

Add MFA Authentication policies to GuardianEntity#379
lbalmaceda merged 7 commits intoauth0:masterfrom
pelletier197:master

Conversation

@pelletier197
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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