:py:mod:`k8s_client.views.users.auth` ===================================== .. py:module:: k8s_client.views.users.auth Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: k8s_client.views.users.auth.login_user .. py:function:: login_user() Login an user Parameters ---------- **Request Body** : `json` JSON containing data for the data: ``"username"``: `string`, Name of the owner user to login ``"password"``: `string`, Password of the user Returns ------- - ``[code: 404]`` Error message if: - ``username`` is NOT inside the DB - ``password`` is NOT valid for the username - ``[code: 200]`` `dict` if ``INPUT`` is valid, with keys: ``"email"`` User email (`str`) ``"first_name"`` User first name (`str`) ``"groups"`` User groups list (`list` [`dict` [ ``"id"`` (`str`), ``"name"`` (`str`) ] ]) ``"id"`` User id (`int`) ``"last_name"`` User last name (`str`) ``"roles"`` User roles list (`list` [`dict` [ ``"id"`` (`str`), ``"name"`` (`str`) ] ]) ``"tokens"`` User tokens (` dict` [ ``"access"`` (`str`), ``"refresh"`` (`str`) ] ) ``"username"`` User username (`str`)