Merge remote-tracking branch 'origin/DSAAS-12' into release(DSAAS)
This commit is contained in:
commit
8861ce9405
1 changed files with 4 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ from fastapi import HTTPException, status
|
|||
from actions.jwt.create_token import CreateToken
|
||||
from packages.v1.administrativo.schemas.g_usuario_schema import GUsuarioAuthenticateSchema
|
||||
from packages.v1.administrativo.actions.g_usuario.g_usuario_get_by_authenticate_action import GetByAuthenticateAction
|
||||
import json
|
||||
|
||||
# Funções utilitárias para segurança (hash e verificação de senha)
|
||||
from actions.security.security import Security
|
||||
|
|
@ -46,8 +47,9 @@ class AuthenticateService:
|
|||
jwtUser = {
|
||||
'usuario_id' : int(get_by_authenticate_result.usuario_id),
|
||||
'login' : str(get_by_authenticate_result.login),
|
||||
'nome' : str(get_by_authenticate_result.login)
|
||||
'nome' : str(get_by_authenticate_result.login),
|
||||
'email' : str(get_by_authenticate_result.email)
|
||||
}
|
||||
|
||||
# Retorna o token dos dados do usuário
|
||||
return create_token.execute('access-token', str(jwtUser))
|
||||
return create_token.execute('access-token', json.dumps(jwtUser))
|
||||
Loading…
Add table
Reference in a new issue