Skip to content

Commit

Permalink
update readme a lil bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Aug 24, 2024
1 parent dac6bd6 commit fd5fef5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const doubleCsrfUtilities = doubleCsrf({
### `getSecret`

```ts
type GetSecretType = (request?: Request) => string | string[]
type GetSecretType = (request: Request, response: Response) => string | string[] | Promise<string | string[]>
```
<p><b>Required</b></p>
Expand All @@ -154,7 +154,7 @@ the previous secret (which might still be used by some users) right away.
### `getSessionIdentifier`
```ts
type GetSessionIdentifierType = (request: Request) => string;
type GetSessionIdentifierType = (request: Request, response: Response) => string | Promise<string>;
```

<p><b>Required</b></p>
Expand Down Expand Up @@ -255,7 +255,7 @@ type DelimiterType = string;
### `getTokenFromRequest`

```ts
(req: Request) => string | null | undefined;
(req: Request, res: Response) => string | null | undefined;
```

<p>
Expand Down Expand Up @@ -408,7 +408,7 @@ This error is customizable via [`errorConfig`](#configuration-error-config)</a>.
### `validateToken`
```ts
type ValidateToken = (req: Request) => boolean;
type ValidateToken = (req: Request, res: Response) => boolean;
```

This function is used by the doubleCsrfProtection middleware to determine whether an incoming request has a valid
Expand Down

0 comments on commit fd5fef5

Please sign in to comment.