-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create a M2M client in Auth0 Update Auth0 client to allow creation of M2M applications * Add extra actions to the app by name endpoint * Display M2M credentials and rotate client secret One time display client credentials for M2M clients and allow the client secret to be rotated. * Update API scopes * Catch failed client secret rotation If the client secret rotation fails because the client cannot be found, remove the stored client ID and ask the user to try creating a new one. * Add button to delete M2M client * Add missing permissions for adding customers * Add endpoint to delete app customer by their email * Add pagination to customers endpoint * Hide m2m creation behind a feature flag
- Loading branch information
1 parent
7262e2d
commit 2845adb
Showing
23 changed files
with
839 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
controlpanel/frontend/jinja2/includes/webapp-m2m-client.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<section class="cpanel-section"> | ||
<h2 class="govuk-heading-m">Machine-to-machine API access</h2> | ||
|
||
{% if not app.m2m_client_id %} | ||
<p class="govuk-body">If your app needs access to the Control Panel API, you can create a machine-to-machine client using the button below.</p> | ||
<form action="{{ url('create-m2m-client', kwargs={ 'pk': app.id }) }}" method="post"> | ||
{{ csrf_input }} | ||
<input type="hidden" name="env_name" value="{{ env_name }}"> | ||
<button class="govuk-button cpanel-button js-confirm" | ||
data-confirm-message="Are you sure you want to create a machine-to-machine client for this app?"> | ||
Create machine-to-machine client | ||
</button> | ||
</form> | ||
{% else %} | ||
<p class="govuk-body">Use the button below to rotate your machine-to-machine client secret. Your client ID will remain the same.</p> | ||
<form action="{{ url('rotate-m2m-credentials', kwargs={ 'pk': app.id }) }}" method="post"> | ||
{{ csrf_input }} | ||
<input type="hidden" name="env_name" value="{{ env_name }}"> | ||
<button class="govuk-button cpanel-button js-confirm" | ||
data-confirm-message="Are you sure you want to rotate your machine-to-machine client credentials?"> | ||
Rotate client secret | ||
</button> | ||
</form> | ||
|
||
<p class="govuk-body">If you no longer require API access you can delete your machine-to-machine client using the button below. If you delete your client, you will have the option of creating a new one.</p> | ||
<form action="{{ url('delete-m2m-client', kwargs={ 'pk': app.id }) }}" method="post"> | ||
{{ csrf_input }} | ||
<input type="hidden" name="env_name" value="{{ env_name }}"> | ||
<button class="govuk-button cpanel-button--destructive js-confirm" | ||
data-confirm-message="Are you sure you want to delete your machine-to-machine client?"> | ||
Delete machine-to-machine client | ||
</button> | ||
</form> | ||
|
||
{% endif %} | ||
<p class="govuk-body">See our user guidance for full details about access to the Control Panel API.</p> | ||
|
||
</section> |
Oops, something went wrong.