wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Nodejs: Authentication with JWT

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the full meaning of JWT?

a)

JSON Web Tokens

b)

JSON Web Tokens

c)

JSON Web Tokens

d)

JSON Web Tokens

2.

what method encodes an object with jwt?

a)

jwt.sign

b)

jwt.encode

c)

jwt.decode

d)

jwt.verify

3.

To retrieve information from a JWT token, what method do we use?

a)

jwt.sign

b)

jwt.verify

c)

jwt.retrieve

d)

jwt.decode

4.

When making an API request to a protected route, where is the token placed as part of the request

a)

headers

b)

body

c)

query

d)

path

5.

What authentication type can we use when passing a token(jwt)?

a)

Bearer Token

b)

Basic Auth

c)

API Keys

d)

OAuth

6.

How can we invalidate a token

a)

set an invalidation option

b)

set an expiry option

c)

delete the token

d)

none of the options

7.

As part of the JWT token, what makes the token unique?

a)

header

b)

body

c)

secret

d)

segments

8.

Why do we return token on Sign ups and logins

a)

So we can use it for authentications and authorization

b)

so we can remove the user

c)

so we can update the db

d)

none of the options

9.

Which component do we use to verify the jwt token from the headers

a)

middleware

b)

controller

c)

views

d)

routes

10.

Which package can we use to encrypt user passwords

a)

encrypter

b)

decoder

c)

bcrypt

d)

crpty