Skip to content

Commit

Permalink
Fixed API domainname and write missing comma (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjyoffice authored Aug 27, 2024
1 parent 3baaab0 commit da3d337
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,14 @@ The request must include all three fields.
- `timeToLive`: (OPTIONAL) Number of seconds the magic link token should be valid for. If not set, the default value is 1 hour.

```http request
POST https://v4.passwwordless.dev/magic-links/send HTTP/1.1
POST https://v4.passwordless.dev/magic-links/send HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
Content-Type: application/json
{
"emailAddress": "[email protected]",
"urlTemplate": "https://www.myapp.com?token=$TOKEN"
"userId": "c8a32e5b-46d3-4808-ae10-16d3e26ff6f9"
"urlTemplate": "https://www.myapp.com?token=$TOKEN",
"userId": "c8a32e5b-46d3-4808-ae10-16d3e26ff6f9",
"timeToLive": 3600
}
```
Expand All @@ -409,12 +409,12 @@ If Magic Links has not been enabled, the `/magic-links/send` endpoint will retur
`GET` requests made to the `/auth-configs/list` endpoint will return a `.json` object containing a list of authentication configurations that can be used by the application. It can be filtered to one specific configuration by passing the purpose name as a query parameter.

```http request
GET https://v4.passwwordless.dev/auth-configs/list HTTP/1.1
GET https://v4.passwordless.dev/auth-configs/list HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
```

```http request
GET https://v4.passwwordless.dev/auth-configs/list?purpose=step-up HTTP/1.1
GET https://v4.passwordless.dev/auth-configs/list?purpose=step-up HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
```

Expand Down Expand Up @@ -463,14 +463,14 @@ If successful, the `/auth-configs/list` endpoint will return a `.json` object co
- `performedBy`: user identifier to track changes to the configuration

```http request
GET https://v4.passwwordless.dev/auth-configs/add HTTP/1.1
GET https://v4.passwordless.dev/auth-configs/add HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
Content-Type: application/json
{
"purpose": "access-secrets-purpose", // identifying string give context to the specific authentication
"timeToLive": "00:03:00", // timespan the token is valid for
"userVerificationRequirement": "preferred" // requirement for if the user has to verify they're allowed to use an authenticator
"userVerificationRequirement": "preferred", // requirement for if the user has to verify they're allowed to use an authenticator
"performedBy": "user_123" // user identifier to track changes to the configuration
}
```
Expand All @@ -492,14 +492,14 @@ If unsuccessful, the `/auth-configs/add` endpoint will return an HTTP 400 (Bad R
- `performedBy`: user identifier to track changes to the configuration

```http request
GET https://v4.passwwordless.dev/auth-configs HTTP/1.1
GET https://v4.passwordless.dev/auth-configs HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
Content-Type: application/json
{
"purpose": "access-secrets-purpose", // existing purpose
"timeToLive": "00:03:00", // timespan the token is valid for
"userVerificationRequirement": "preferred" // requirement for if the user has to verify they're allowed to use an authenticator
"userVerificationRequirement": "preferred", // requirement for if the user has to verify they're allowed to use an authenticator
"performedBy": "user_123" // user identifier to track changes to the configuration
}
```
Expand All @@ -516,7 +516,7 @@ If an unknown purpose is passed through, the `/auth-configs` endpoint will retur
`POST` requests made to the `/auth-configs/delete` endpoint delete a specific authentication configuration, as specified by a `purpose`.

```http request
GET https://v4.passwwordless.dev/auth-configs/add HTTP/1.1
GET https://v4.passwordless.dev/auth-configs/add HTTP/1.1
ApiSecret: myapplication:secret:11f8dd7733744f2596f2a28544b5fbc4
Content-Type: application/json
Expand Down

0 comments on commit da3d337

Please sign in to comment.