Optional
accessName of the request header where access token is made available by middleware.
Defaults to X-FiefAuth-Access-Token
.
Optional
accessName of the request header where access token information is made available by middleware.
Defaults to X-FiefAuth-Access-Token-Info
.
Optional
apiOptional API handler for forbidden response.
The default handler will return a plain text response with status code 403.
Optional
apiOptional API handler for unauthorized response.
The default handler will return a plain text response with status code 401.
Instance of a Fief client.
Optional
forbiddenPath of the page showing a forbidden error to the user.
This page will be shown when the user doesn't have the required scope or permissions.
Defaults to /forbidden
.
Optional
loginPath to the login page.
Defaults to /login
.
Optional
logoutPath to the logout page.
Defaults to /logout
.
Absolute callback URI where the user will be redirected after Fief logout.
Example: http://localhost:3000
Optional
redirectPath to the callback page where the user will be redirected after Fief authentication.
Defaults to /auth-callback
.
Absolute callback URI where the user will be redirected after Fief authentication.
Example: http://localhost:3000/auth-callback
Optional
returnName of the cookie that will keep the page the user was trying to access while unauthenticated.
It allows to automatically redirect the user to the page they were looking for after a successul authentication.
Defaults to return_to
.
Optional
returnPath where the user will be redirected by default
after a successfull authentication if there is
not returnTo
cookie.
Defaults to /
.
Name of the cookie that will keep the session.
Optional
userName of the request header where authenticated user ID is made available by middleware.
Defaults to X-FiefAuth-User-Id
.
Optional
userAn instance of a IUserInfoCache class.
Parameters to instantiate a FiefAuth helper class.