I now have a foggy idea as to how motp (http://motp.sourceforge.net/)
can be implemented.. Here is how i think it should be done:

- extend the auth using define_table.. include 2 custom fields
motp_secret and motp_pin
- define a custom login method (say motp_auth).. should it be
something like the email_auth in the login methods under contrib/
login_methods ..?
- call the custom login method in model like

from gluon.contrib.login_methods.email_auth import email_auth
auth.settings.login_methods.append(motp_auth())

motp password can be calculated by creating  a lazy virtual field.
Calculated by
md5('epoch_time'[:-1]+'motp_secret'+'motp_pin').hexdigest()[:6]

now my question:
- how can i retrieve the motp_pin and motp_secret from the auth
username table in the custom login method?

am i on the right path? please correct me if i am wrong
please help..


On Jan 8, 11:56 am, whowhywhat <mads...@gmail.com> wrote:
> thanks a lot for the tip and recipe howsec.. will go through and
> try .. :)
> will postback
>
> On Jan 7, 9:54 pm, howesc <how...@umich.edu> wrote:
>
>
>
>
>
>
>
> > sounds cool.
>
> > the formula will be similar to what i did here to add facebook, twitter,
> > google accounts auth to 
> > web2py:http://www.web2pyslices.com/slices/take_slice/77
>
> > obviously the custom methods will interact with OTP, but the formula should
> > be similar.
>
> > cfh

Reply via email to