šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

my-oauth-package

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

my-oauth-package

A package for handling Xecurify authentication

2.3.5
PyPI
Maintainers
1

Oauth signin

This is just a simple oauth login package

  • first install the package using the command "pip install my-oauth-package==1.0.4" in the terminal
  • After installing import this library to your views.py to use it using "from my_oauth_package.test import OAuthManager" where my_oauth_package is the package file name, test is python file in that folder and OAuthManager is the class name
  • After importing the library code your creditials which are client_id, client_secret, base_url, redirect_uri and certificate
  • As my library has two functions so to access that you have to create two functions. In that, you have to create the instance of the class for using the functionality. And then, return that instance of class to the library function
    ex of the function
    def oauth_login(request): manager = OAuthManager(client_id, client_secret, base_url, redirect_uri, certificate) print("oauth login") return manager.oauth_login(request)

def callback(request): manager = OAuthManager(client_id, client_secret, base_url, redirect_uri, certificate) print("xecurify callback") return manager.xecurify_callback(request)

  • Create the route to access in urls.py by giving url, view function and name
    ('oauth_login/', views.oauth_login, name='oauth_login')
    ('auth/callback/', views.callback, name='callback')
  • Run the terminal using "python manage.py runserver" and then go to the 'xecurify_callback' route for oauth

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts