Closed francoberton closed 7 years ago
Hello @francoberton, basically I am using jwt2 plugin (https://github.com/dwyl/hapi-typescript-example/blob/master/src/plugins/jwt-auth/index.ts).
If you want to learn more about JWT Authentication read this: https://github.com/dwyl/hapi-auth-jwt2
Thank you Marco for quick answer, I didn't notice the validate function associated to plugin, so the function is executed for each REST-api that provide the authentication. Is it right?
Sorry for the late answer.
Yes exactly! But you can have multiple strategies, jwt, cookies, basic. You can define the name when you are registering the plugin.
Perfect, thank you very much for your help!
I would like to know how to implement a rest-api to check secret and expiration