Appearance
Authentication
This middleware makes sure that the request is authenticated. It is used to protect your worker from unauthorized access.
typescript
type middlewares = {
AuthenticationMiddleware: {
handle(context: Context, next: Function): Promise<Response>
}
}
The authentication middleware will use your toml configured AUTHENTICATION_DOMAIN
to fetch the /.well-known/jwks.json
to perform the signature verification. You can use any identity provider of your choice or even implement your own. The codedraw-client comes with an out of the box integration to Kinde make sure to check it out.