db.logout() in mongoDB

logout()

This method ends the current authentication session.

Note: This function has no effect if the current session is not authenticated.


Syntax:

db.logout() 


Example

MongoDB

db.logout()

Output:

{ "ok" : 1 }


No comments:

Post a Comment