I want to create a system that works similar to stripe. There'll be live API keys, as well as test API keys. I have been thinking of how to implement this architecture, and I am not sure the best way to go about it. I found a similar question on this but it didn't help much.
Architecturing testmode/livemode using OAuth 2 token <https://stackoverflow.com/questions/24539688/architecturing-testmode-livemode-using-oauth-2-token> My current progress is basically: - I have decided to use https://github.com/James1345/django-rest-knox instead of DRF's default authtoken because knox supports multiple token creation and I thougt I needed that feature. - I intend to create tokens as pub_key_<token> and test_key_<token> and remove or strip the prefix before authentication - I intend to create a LiveAccount Model and a TestAcoount model. However, after authenticating the request from a test api token, it's unclear how to route or perform requests to TestAcoount instead of LiveAccount. Please any ideas or a better implementation strategy is highly welcomed stackoverflow link: https://stackoverflow.com/questions/67995479/create-accounts-and-api-tokens-for-live-mode-and-test-mode -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADZv-jCvu16tYsTQa6YbD_98fnbgN%3DRgY80gBH57BebxFCipfQ%40mail.gmail.com.