Feature 10914: Enforce Password change on First login

Added Implementation code for Enforce Password change on First login
and expire password after preset number of days feature

Change-Id: Id1ac670a8f4f27d701aef430f426e911b290b885
Signed-off-by: selvi.j <selvi.j@tataelxsi.co.in>
diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py
index 67cf58b..502207f 100644
--- a/osm_nbi/nbi.py
+++ b/osm_nbi/nbi.py
@@ -953,7 +953,12 @@
             self._set_location_header("admin", "v1", "tokens", outdata["_id"])
             # for logging
             self._format_login(token_info)
-
+            # password expiry check
+            if self.authenticator.check_password_expiry(outdata):
+                outdata = {"id": outdata["id"],
+                           "message": "change_password",
+                           "user_id": outdata["user_id"]
+                           }
             # cherrypy.response.cookie["Authorization"] = outdata["id"]
             # cherrypy.response.cookie["Authorization"]['expires'] = 3600
         elif method == "DELETE":