Skip to content

Commit 6c4e03b

Browse files
rkhoriandererjohnson
authored andcommitted
Update passwordless format (#8272)
* Passwordless rework * Revert "Passwordless rework" This reverts commit b322b45. * Passwordless troubleshooting * Fix har snippet * Fix rules * remove error * Fix image alignment * First round of chages to consolidate guides * Revert "Merge branch 'master' into rk-passwordless" This reverts commit 0b8c4fd, reversing changes made to 22759aa. * Final touches to reorg * Fix typos * Shorten side links
1 parent db19bb1 commit 6c4e03b

File tree

185 files changed

+1124
-1275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1124
-1275
lines changed

articles/api/info.md

+15-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: Auth0 APIs
3-
description: Learn about Auth0's Management and Authentication APIs.
2+
description: This page explains the basics of Auth0's Management and Authentication APIs.
43
section: apis
54
crews: crew-2
65
topics:
@@ -10,22 +9,22 @@ topics:
109
contentType: reference
1110
useCase: invoke-api
1211
---
13-
# Auth0 APIs
1412

15-
Auth0 exposes the following APIs for developers to consume in their applications.
13+
# Auth0 APIs
1614

17-
## Authentication API
15+
Auth0 exposes two APIs for developers to consume in their applications:
1816

19-
The Authentication API exposes identity functionality for Auth0 and supported identity protocols (including <dfn data-key="openid">OpenID Connect</dfn>, OAuth, and <dfn data-key="security-assertion-markup-language">SAML</dfn>).
17+
* **Authentication**: Handles identity-related tasks;
18+
* **Management**: Handles management of your Auth0 account, including functions related to (but not limited to):
2019

21-
Typically, you should consume this API through one of the Auth0 SDKs, such as [Auth0.js](/libraries/auth0js), or a library like [Lock](/libraries/lock). However, if you are building your authentication UI manually, you will need to call the Authentication API directly.
20+
* Applications;
21+
* Connections;
22+
* Emails;
23+
* Users.
2224

23-
Some example tasks include:
25+
## Authentication API
2426

25-
* getting [tokens](/tokens) during authentication
26-
* requesting a user's profile using an [Access Token](/tokens/access-tokens)
27-
* exchanging [Refresh Tokens](/tokens/refresh-token) for new Access Tokens
28-
* requesting a challenge for [multi-factor authentication (MFA)](/multifactor-authentication)
27+
The Authentication API exposes Auth0 identity functionality, as well as those of supported identity protocols (such as <dfn data-key="openid">OpenID Connect</dfn>, OAuth, and <dfn data-key="security-assertion-markup-language">SAML</dfn>). Typically, you consume this API through one of the Auth0 SDKs, such as [Auth0.js](/libraries/auth0js) or a library like [Lock](/libraries/lock). If you are building your authentication UI manually, you will need to interface directly with the Authentication API.
2928

3029
<div class="api-info-wrapper">
3130
<div class="block-links">
@@ -35,7 +34,7 @@ Some example tasks include:
3534
<div class="wrapper-left">
3635
<a href="/auth-api" class="illustration i-apiexplorer"></a>
3736
<h4>API Explorer</h4>
38-
<p>Explore the requests and responses for Auth0 Authentication API endpoints in your browser.</p>
37+
<p>Learn about and use the Auth0 Authentication API in the browser.</p>
3938
<p><a href="/auth-api">Open API Explorer</a></p>
4039
</div>
4140
</div>
@@ -55,14 +54,7 @@ Some example tasks include:
5554

5655
## Management API v2
5756

58-
The Management API allows you to manage your Auth0 account programmatically, so you can automate configuration of your environment. Most of the tasks you can perform in the Auth0 Management Dashboard can also be performed programmatically by using this API.
59-
60-
Some example tasks include:
61-
62-
* registering your applications and APIs with Auth0
63-
* setting up [connections](/connections) with which your users can authenticate
64-
* [managing users](/users)
65-
* [linking user accounts](/link-accounts)
57+
The Management API allows you to manage every aspect of your Auth0 account. For example, you can use the Management API to automate the configuration of your user environments or for runtime tasks such as user creation.
6658

6759
<div class="api-info-wrapper">
6860
<div class="block-links">
@@ -72,7 +64,7 @@ Some example tasks include:
7264
<div class="wrapper-left">
7365
<a href="/api/v2" class="illustration i-apiexplorer"></a>
7466
<h4>API Explorer</h4>
75-
<p>Explore the requests and responses for Auth0 Management API endpoints in your browser.</p>
67+
<p>Learn about and use the Auth0 Management API in the browser.</p>
7668
<p><a href="/api/v2">Open API Explorer</a></p>
7769
</div>
7870
</div>
@@ -92,4 +84,4 @@ Some example tasks include:
9284

9385
### Management API v1 - DEPRECATED
9486

95-
The Management API v1 is deprecated and should not be used for new projects. If your existing application uses Management API v1, please see the [Management API v1 documentation](/api/management/v1).
87+
The Management API v1 is deprecated and should not be used for new projects. If your existing application uses Management API v1, refer to the [Management API v1 documentation](/api/management/v1).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Create Rules
3+
description: Learn how to create a rule using the Auth0 Management API. You can use rules to customize and extend Auth0's capabilities.
4+
topics:
5+
- mgmt-api
6+
- rules
7+
- extensibility
8+
contentType:
9+
- how-to
10+
useCase:
11+
- build-an-app
12+
- call-api
13+
- secure-api
14+
---
15+
# Create Rules
16+
17+
This guide will show you how to create [rules](/rules) using Auth0's Management API. This task can also be performed [using the Dashboard](/dashboard/guides/rules/create-rules).
18+
19+
1. Make a `POST` call to the [Create Rule endpoint](/api/management/v2#!/Rules/post_rules). Be sure to replace `MGMT_API_ACCESS_TOKEN`, `RULE_NAME`, `RULE_SCRIPT`, `RULE_ORDER`, and `RULE_ENABLED` placeholder values with your Management API Access Token, rule name, rule script, rule order number, and rule enabled value, respectively.
20+
21+
```har
22+
{
23+
"method": "POST",
24+
"url": "https://${account.namespace}/api/v2/roles",
25+
"headers": [
26+
{ "name": "Content-Type", "value": "application/json" },
27+
{ "name": "Authorization", "value": "Bearer MGMT_API_ACCESS_TOKEN" },
28+
{ "name": "Cache-Control", "value": "no-cache" }
29+
],
30+
"postData": {
31+
"mimeType": "application/json",
32+
"text" : "{ \"name\": \"RULE_NAME\", \"script\": \"RULE_SCRIPT\" }"
33+
}
34+
}
35+
```
36+
37+
| **Value** | **Description** |
38+
| - | - |
39+
| `MGMT_API_ACCESS_TOKEN` | [Access Token for the Management API](/api/management/v2/tokens) with the <dfn data-key="scope">scope</dfn> `create:rules`. |
40+
| `RULE_NAME` | Name of the rule you would like to create. The rule name can only contain alphanumeric characters, spaces, and hyphens; it may not start or end with spaces or hyphens. |
41+
| `RULE_SCRIPT` | Script that contains the code for the rule. Should match what you would enter if you were [creating a new rule using the Dashboard](/dashboard/guides/rules/create-rules). |
42+
| `RULE_ORDER` (optional) | Integer that represents the order in which the rule should be executed in relation to other rules. Rules with lower numbers are executed before rules with higher numbers. If no order number is provided, the rule will execute last.
43+
| `RULE_ENABLED` (optional) | Boolean that represents whether the rules is enabled (`true`) or disabled (`false`). |

articles/architecture-scenarios/server-api/part-2.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ useCase:
1616

1717
# Server + API: Auth0 Configuration
1818

19-
In this section, we will review all the configurations we need to apply using the [Auth0 Dashboard](${manage_url}).
19+
In this section we will review all the configurations we need to apply using the [Auth0 Dashboard](${manage_url}).
2020

2121
## Configure the API
2222

@@ -30,17 +30,17 @@ You will be required to supply the following details for your API:
3030

3131
![Create API](/media/articles/architecture-scenarios/server-api/create-api.png)
3232

33-
Fill in the required information, and click the **Create** button.
33+
Fill in the required information and click the **Create** button.
3434

3535
### Signing Algorithms
3636

37-
When you create an API, you must select the algorithm with which your tokens will be signed. The signature is used to verify that the sender of the JWT is who it says it is and to ensure that the message wasn't changed along the way.
37+
When you create an API you have to select the algorithm your tokens will be signed with. The signature is used to verify that the sender of the JWT is who it says it is and to ensure that the message wasn't changed along the way.
3838

3939
::: note
40-
The signature is part of a JWT. If you are unfamiliar with JWT structure, please see [JSON Web Token Structure](/tokens/reference/jwt/jwt-structure).
40+
The signature is part of a JWT. If you are not familiar with the JWT structure please refer to: [JSON Web Tokens (JWTs) in Auth0](/jwt#what-is-the-json-web-token-structure-).
4141
:::
4242

43-
To create the signature, you must take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. That algorithm, which is part of the JWT header, is the one you select for your API: `HS256` or `RS256`.
43+
To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. That algorithm, which is part of the JWT header, is the one you select for your API: `HS256` or `RS256`.
4444

4545
- **RS256** is an [asymmetric algorithm](https://en.wikipedia.org/wiki/Public-key_cryptography) which means that there are two keys: one public and one private (secret). Auth0 has the secret key, which is used to generate the signature, and the consumer of the JWT has the public key, which is used to validate the signature.
4646

@@ -56,47 +56,47 @@ For a more detailed overview of the JWT signing algorithms refer to: [JSON Web T
5656

5757
## Configure the Scopes
5858

59-
Once the application has been created, you will need to configure the Scopes that applications can request during authorization.
59+
Once the application has been created you will need to configure the Scopes which applications can request during authorization.
6060

61-
In the settings for your API, go to the *Scopes* tab. In this section, add all four of the scopes discussed before: `read:timesheets`, `create:timesheets`, `delete:timesheets`, and `approve:timesheets`. Also add an additional scope: `batch:upload`.
61+
In the settings for your API, go to the *Scopes* tab. In this section you can add all four of the scopes which was discussed before, namely `batch:upload`, `read:timesheets`, `create:timesheets`, `delete:timesheets`, `approve:timesheets`.
6262

6363
::: note
64-
For the purposes of this document, we will only be concerned with the `batch:upload` scope because that is all that is required by the cron job. However, for the sake of completeness, we are adding the necessary scopes which will be required by future applications.
64+
For the purposes of this document we will only be ever concerned with the `batch:upload` scope, as that is all that is required by the Cron job. For completeness sake we are however adding the necessary scopes which will be required by future applications as well.
6565
:::
6666

6767
![Add Scopes](/media/articles/architecture-scenarios/server-api/add-scopes.png)
6868

6969
## Create the Application
7070

71-
When creating an API in the Auth0 Dashboard, a test application for the API will automatically be generated. In the Auth0 Dashboard, navigate to the [Application Section](${manage_url}/#/applications), and you will see the test application for the Timesheets API.
71+
When creating an API in the Auth0 Dashboard, a test application for the API will automatically be generated. In the Auth0 Dashboard, navigate to the [Application Section](${manage_url}/#/applications) and you will see the test application for the Timesheets API.
7272

7373
![Machine to Machine Application](/media/articles/architecture-scenarios/server-api/non-interactive-client.png)
7474

7575
Go to the settings for the application by clicking on the gear icon, and rename the application to `Timesheets import Job`.
7676

77-
For the cron job, you will need a Machine-to-Machine Application. The test application that was generated when the API was created was automatically configured as a Machine-to-Machine Application:
77+
For the cron job you will need a Machine to Machine Application. This test application which was generated when the API was created was automatically configured as a Machine to Machine Application as can be seen in the screenshot below.
7878

7979
![Machine to Machine Application Settings](/media/articles/architecture-scenarios/server-api/non-interactive-client-settings.png)
8080

8181
## Configure Application's access to the API
8282

83-
Finally, you must allow the application access to the Timesheets API. Go back to the configuration of the API, and select the *Machine to Machine Application* tab.
83+
The final part of the Auth0 configuration is to allow the application access to the Timesheets API. Go back to the configuration of the API, and select the *Machine to Machine Application* tab.
8484

8585
You will see the **Timesheets Import Job** application listed, and it should have access to API as can be seen from the switch to the right of the application name which indicates a value of `Authorized`. If it does not indicate that the application is authorized, simply toggle the value of the switch from `Unauthorized` to `Authorized`.
8686

8787
![Authorize Application](/media/articles/architecture-scenarios/server-api/authorize-client.png)
8888

89-
You will also need to specify which scopes will be included in Access Tokens that are issued to the application when the application authorizes with Auth0.
89+
You will also need to specify which scopes will be included in Access Tokens which are issued to the application when the application authorizes with Auth0.
9090

9191
Expand the settings for the application by clicking on the down arrow to the far right, and you will see the list of available scopes. The cron job will only require the `batch:upload` scope as it will simply create new timesheets based on the timesheet entries in the external system.
9292

93-
Once you have selected the `batch:upload` scope, save the settings by clicking the **Update** button.
93+
Once you have selected the `batch:upload` scope you can save the settings by clicking the **Update** button.
9494

9595
![Assign Scopes](/media/articles/architecture-scenarios/server-api/assign-scopes.png)
9696

97-
Now that we have designed our solution and discussed the configurations needed on Auth0's side, we can proceed with the implementation part. That's what the next paragraph is all about, so keep reading!
97+
Now that we have designed our solution and discussed the configurations needed on Auth0 side, we can proceed with the implementation part. That's what the next paragraph is all about, so keep reading!
9898

9999

100100
<%= include('./_stepnav', {
101101
prev: ["1. Solution Overview ", "/architecture-scenarios/server-api/part-1"], next: ["3. Application Implementation", "/architecture-scenarios/server-api/part-3"]
102-
}) %>
102+
}) %>

0 commit comments

Comments
 (0)