Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
girder-cli-oauth-client
Advanced tools
A Python library for performing OAuth login to a Girder 4 (Django) server.
A Python library for performing OAuth login to a Girder 4 (Django) server.
This provides support for authenticating with Girder 4 servers, using the OAuth2.0 Authorization Code Grant with PKCE flow and out-of-band redirection.
Install the library:
pip install girder-cli-oauth-client
Instantiate an OauthClient
with your application-specific configuration:
from girder_cli_oauth_client import GirderCliOAuthClient
oauth_client = GirderCliOAuthClient(
'http://localhost:8000/oauth/',
'1ohsuyWIx9fEsJhmAH2AWGNUqd8Wsd7LHyongtVy',
['identity'],
)
Call login
when it's time to start a login flow:
oauth_client.login() # open the browser to login and wait for a code
At the start of every application start, unconditionally call maybe_restore_login
, to attempt to
restore a login state; this will no-op if no login is present.
oauth_client.maybe_restore_login()
Include these headers with every API request:
requests.get('http://localhost:8000/api/users/me', headers=oauth_client.auth_headers)
Call logout
to clear any active login:
oauth_client.logout()
This repository comes bundled with an example application. Run it with:
git clone https://github.com/girder/girder-cli-oauth-client.git
pip install -e '.[dev]'
cd example
python cli.py login
python cli.py me
FAQs
A Python library for performing OAuth login to a Girder 4 (Django) server.
We found that girder-cli-oauth-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.