WorksheetsNodejs: Authentication with JWT
Total questions: 10
Worksheet time: 5mins
What is the full meaning of JWT?
JSON Web Tokens
JSON Web Tokens
JSON Web Tokens
JSON Web Tokens
what method encodes an object with jwt?
jwt.sign
jwt.encode
jwt.decode
jwt.verify
To retrieve information from a JWT token, what method do we use?
jwt.sign
jwt.verify
jwt.retrieve
jwt.decode
When making an API request to a protected route, where is the token placed as part of the request
headers
body
query
path
What authentication type can we use when passing a token(jwt)?
Bearer Token
Basic Auth
API Keys
OAuth
How can we invalidate a token
set an invalidation option
set an expiry option
delete the token
none of the options
As part of the JWT token, what makes the token unique?
header
body
secret
segments
Why do we return token on Sign ups and logins
So we can use it for authentications and authorization
so we can remove the user
so we can update the db
none of the options
Which component do we use to verify the jwt token from the headers
middleware
controller
views
routes
Which package can we use to encrypt user passwords
encrypter
decoder
bcrypt
crpty
