diff --git a/docs/middleware/builtin/basic-auth.md b/docs/middleware/builtin/basic-auth.md index d463c974..b1808060 100644 --- a/docs/middleware/builtin/basic-auth.md +++ b/docs/middleware/builtin/basic-auth.md @@ -87,6 +87,10 @@ A function to handle hashing for safe comparison of passwords. The function to verify the user. +### invalidUserMessage: `string | object | MessageFunction` + +`MessageFunction` is `(c: Context) => string | object | Promise`. The custom message if the user is invalid. + ## More Options ### ...users: `{ username: string, password: string }[]` diff --git a/docs/middleware/builtin/bearer-auth.md b/docs/middleware/builtin/bearer-auth.md index 9387c722..c1c82ab8 100644 --- a/docs/middleware/builtin/bearer-auth.md +++ b/docs/middleware/builtin/bearer-auth.md @@ -110,3 +110,15 @@ A function to handle hashing for safe comparison of authentication tokens. ### verifyToken: `(token: string, c: Context) => boolean | Promise` The function to verify the token. + +### noAuthenticationHeaderMessage: `string | object | MessageFunction` + +`MessageFunction` is `(c: Context) => string | object | Promise`. The custom message if it does not have an authentication header. + +### invalidAuthenticationHeaderMessage: `string | object | MessageFunction` + +The custom message if the authentication header is invalid. + +### invalidTokenMessage: `string | object | MessageFunction` + +The custom message if the token is invalid.