
    cFjh                     r    d dl mZmZ d dlmZ d dlmZmZ  e       Zej                  d      defd       Z
y)    )	APIRouterHTTPException)	UserLogin)verify_usercreate_jwt_tokenz/loginuserc                     t        | j                  | j                        }|rt        | j                        }|ddS t	        dd      )Nbearer)access_token
token_typei  zInvalid credentials)status_codedetail)r   usernamepasswordr   r   )r   is_validtokens      8C:\Python312\panapi\aramax_api\app\routes\auth_routes.pyloginr      s@    4==$--8H / %X>>
C0E
FF    N)fastapir   r   app.schemas.user_schemar   app.services.auth_servicer   r   routerpostr    r   r   <module>r      s:    , - C	XG	 G Gr   