Skip to content

Commit

Permalink
docs: improve docs for new config option
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonraimondi committed Aug 12, 2024
1 parent cf41704 commit d20a283
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/docs/endpoints/introspect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ app.post("/token/introspect", async (req: Express.Request, res: Express.Response
});
```

### Configure

Client credentials authentication is enabled by default. To disable, set `authenticateIntrospect` to `false`.

```ts
const authoriztionServer = new AuthorizationServer(
...,
{
authenticateIntrospect: false,
}
);
```

### Request

A complete token introspection request will include the following parameters:
Expand Down Expand Up @@ -61,6 +74,22 @@ You can authenticate by passing the `client_id` and `client_secret` as a query s
```
</TabItem>

<TabItem value="basic-auth" label="authenticateIntrospect = false">
```ts
new AuthorizationServer(..., {
authenticateIntrospect: false,
})
```

```http request []
POST /token/introspect HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
token=xxxxxxxxxx
&token_type_hint=refresh_token
```
</TabItem>
</Tabs>
</details>

Expand Down
30 changes: 30 additions & 0 deletions docs/docs/endpoints/revoke.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ app.post("/token/revoke", async (req: Express.Request, res: Express.Response) =>
});
```

### Configure

Client credentials authentication is enabled by default. To disable, set `authenticateRevoke` to `false`.

```ts
const authoriztionServer = new AuthorizationServer(
...,
{
authenticateRevoke: false,
}
);
```

### Request

A complete token revocation request will include the following parameters:
Expand Down Expand Up @@ -61,6 +74,23 @@ You can authenticate by passing the `client_id` and `client_secret` as a query s
```
</TabItem>

<TabItem value="basic-auth" label="authenticateRevoke = false">
```ts
new AuthorizationServer(..., {
authenticateRevoke: false,
})
```

```http request []
POST /token/revoke HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
token=xxxxxxxxxx
&token_type_hint=refresh_token
```
</TabItem>

</Tabs>
</details>

Expand Down

0 comments on commit d20a283

Please sign in to comment.