Thank you @Naveen Kumar and @Matemática A3K Will try both the options. Regards Pradyum
On Wed, Sep 23, 2020 at 12:12 PM naveen Kumar <naveenkumar...@gmail.com> wrote: > class TokenGenerator(PasswordResetTokenGenerator): > > def _make_hash_value(self, user, timestamp): > return ( > six.text_type(user.pk) + six.text_type(timestamp) + > six.text_type(user.username) ) > > > account_activation_token = TokenGenerator() > > follow this you can hash both values company, time_age > > On Mon, Sep 21, 2020 at 7:45 PM Pradyum Gupta <prady...@gmail.com> wrote: > >> am looking for some advice/Mentorship. >> >> wanted to create an *invitation link for onboarding user to a company* >> similarly >> slack does by sending company employees email so that they could directly >> join the company but using the Django rest framework is there any method >> that you can refer? >> >> see things that I have in my mind coming is that I can put company_id in >> hash inside a link and then when a user will come with that hash I can >> compare it and onboard the user. >> >> but in that case, there is no link_time_age I can compare! >> >> is there any method or any crypto algo in which is can convert >> company_UUID into some string and decode back into UUID and then compare it >> through icontains and similarly I can do with time and age of link? >> >> but first of all, is this the right approach? or how do people in a >> company like slack or telegram do? >> >> any kind of help will be really appreciated. >> >> See what am looking for certain guidance or any reference documentation. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django REST framework" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-rest-framework+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-rest-framework/5cec683f-45d8-4259-a992-0a20f2f3053an%40googlegroups.com >> <https://groups.google.com/d/msgid/django-rest-framework/5cec683f-45d8-4259-a992-0a20f2f3053an%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django REST framework" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-rest-framework/ZBYxC2pEn7Y/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > django-rest-framework+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-rest-framework/CAN9FMSwjSDnfk1HgvjVBwqtSizb79NSWo36aSwiuDfJ-DR7Yhg%40mail.gmail.com > <https://groups.google.com/d/msgid/django-rest-framework/CAN9FMSwjSDnfk1HgvjVBwqtSizb79NSWo36aSwiuDfJ-DR7Yhg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/CAPWtzYXBMYxJYrKoRTY8oTnQ0NCrh-P1fFa3GPQdj5H6u%2Bcn4A%40mail.gmail.com.