24
loading...
This website collects cookies to deliver better user experience
Header
The header consists of two parts:
The signing algorithm being used
The type of token, which is in this case mostly “JWT”
Example:
{ "alg": "HS256", "typ": "JWT" }
Payload
The payload usually contains the claims and additional data like issuer, expiration time, and audience.
Signature
To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.
Create-Operation:
In MongoDB when we can add new documents to a collection. If the collection does not exist, create operations also create the collection. We can insert one or many documents
db.collection.insertOne()
db.collection.insertMany()
Read Operation:
Read operations retrieve documents from a collection; i.e. query a collection for documents. We can find the document using the read operation.
db.users.find({})
Update Operations:
By using update operation we can update any document or replace any. We use this operation in MongoDB to update
db.collection.updateOne()
db.collection.updateMany()
db.collection.replaceOne()
db.collection.deleteOne()
db.collection.deleteMany()