Sorry me, I did not know I was in the international group. My question is
this, I have the structure below:

Clients = db.define_table('clients'
                           ,Field('name')
                           ,Field('document',unique=True)
                           ,Field('email_login','string')
                           ,Field('passwd','string')
                           ,Field('telephone','list:string')
                           ,Field('address','list:string')
                           ,Field('status')
                          )
I need made a validation to this client, because other micro througth web
sent me a hash witch the data: email_login, passwd and document each. So,
on the controller I compare this data to the database, because on the
database the data is not criptografed.
See example:

A micro from the external network will send me a hash with the document,
email_login and passwd encrypted, separately. I need to make a query so
that I can encrypt this data in the database to buy it, something like:



cliente = db(hashlib.md5(
  (Clientes.senha).hexdigest()==request.args(0)) |
(Clientes.documento).hexdigest()==request.args(0))
|  (Clientes.email_login).hexdigest()==request.args(0)).select()

select * from clientes where md5(email_login) = argumento_hash or ....

Em 19 de março de 2017 19:11, Marlysson Silva <[email protected]>
escreveu:

> Aqui é o grupo internacional , sugeriria postar a pergunta em inglês
> também.
>
> Ou então postar no grupo pt-br do web2py, lá o pessoal ajuda também.
> https://groups.google.com/forum/#!forum/web2py-users-brazil
>
> Mas o que está querendo é validar o login do usuário?
>
> Here it the web2py international group , would sugest you post the ask in
> english too.
>
> Or so to post in portuguese group's web2py , there are person help too.
>
> But what you want to do is validate the user login?
>
> Em sábado, 18 de março de 2017 15:57:05 UTC-3, Rodrigo attique santana
> escreveu:
>>
>> Olá meus amigos.
>> Estou postando esta dúvida aqui pois não encontrei nada na net e acredito
>> que possa ser de utilidade para muitos.
>>
>> Tenho a seguinte estrutura:
>> Clientes = db.define_table('clientes'
>>                            ,Field('nome')
>>                            ,Field('documento',unique=True)
>>                            ,Field('email_login','string')
>>                            ,Field('senha','string')
>>                            ,Field('telefone','list:string')
>>                            ,Field('endereco','list:string')
>>                            ,Field('status')
>>                           )
>>
>> Eu preciso fazer uma validação para este cliente pois o sistema externo
>> me enviará um hash com um campo aleatório, email_login, senha, documento.
>> No banco de dados estes campos não estão criptografados eu preciso
>> criptografá-los em tempo de consulta. Como em:
>>
>> cliente = db(hashlib.md5(
>>   (Clientes.senha).hexdigest()==request.args(0)) |
>> (Clientes.documento).hexdigest()==request.args(0)) |
>>  (Clientes.email_login).hexdigest()==request.args(0)).select()
>>
>> Tipo, ele tem que converter em md5 no memento da consulta. Como ein:
>>
>> select * from clientes where md5(email_login) = argumento_hash or ....
>>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/vEEU4dkL8sI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
ATT
Rodrigo Attique - Programador Desenvolvedor
9 8203.4651 / 9 9151.8339 (whatsapp)
www.attiquetecnologia.com.br

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to