How can you add oauth to the plugin

I am trying to design a oauth for my openapi plugin, How can i modify my main.py file for the requirement?