You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48a7ccb
Browse filesBrowse the repository at this point in the historyBrowse files
* @param {BearerAuthOptions} options - The options for the bearer authentication middleware.
74
75
* @param {string | string[]} [options.token] - The string or array of strings to validate the incoming bearer token against.
75
76
* @param {Function} [options.verifyToken] - The function to verify the token.
@@ -83,7 +84,7 @@ type BearerAuthOptions =
83
84
* @param {string | object | MessageFunction} [options.invalidAuthenticationHeader.wwwAuthenticateHeader="Bearer error=\"invalid_request\""] - The response header value for the WWW-Authenticate header when authentication header is invalid.
* @param {string | object | MessageFunction} [options.invalidToken.wwwAuthenticateHeader="Bearer error=\"invalid_token\""] - The response header value for the WWW-Authenticate header when token is invalid.
86
-
* @returns {MiddlewareHandler} The middleware handler function.
87
+
* @returns {MiddlewareHandler<E>} The middleware handler function.
87
88
* @throws {Error} If neither "token" nor "verifyToken" options are provided.
88
89
* @throws {HTTPException} If authentication fails, with 401 status code for missing or invalid token, or 400 status code for invalid request.
0 commit comments