Saravanan666/pypi-org huggingface dataset:
Package: auth3
Auth3 Python SDKThe officialAuth3python SDK library.API DocumentationCheck-out the API documentation athttps://docs.auth3.dev/apis/identity-platform/administrativefor further help.InstallationAdd to your requirements.txt:auth3-sdk>=1.0.0Or run:python3 -m pip install --upgrade auth3-sdkBuildRunpythonsetup.pybuild# from within the root folder (this)Install from sources$pipinstall-rrequirements.txt
$GRPC_PYTHON_BUILD_WITH_CYTHON=1pythonsetup.pyinstall# from within the root folder (this)Or, with pip:# For the next two commands do `sudo pip install` if you get permission-denied errors$pipinstall-rrequirements.txt
$GRPC_PYTHON_BUILD_WITH_CYTHON=1pipinstall.Additional helpYou can find further help, examples, tools and suggestionshere.Change LanguageNot your target language? Check out our official SDKs for:gocppjavanodejsdartpythonphprubyrustscalaswiftc#ContributingAt this time we don't accept external contributions, but we're open for feedbacks and requests. We're always looking for contributions on our security, refer toour dedicated pagefor more.SupportCustomers of the Auth3 Identity Platform can access support through the official channels available onour website. We won't be able to accomodate Customer requests through the bug tracker for security reasons.LicenseRead theLICENSE.
Package: authanor
AuthanorA tool providing a a Pythonic interface to SQLAlchemy while enforcing authorization criteria for Flask.SQLAlchemy provides a solid interface for managing database operations.
However, this package is designed to enable the construction of handler objects that perform a series of consistent actions on many similar ORM entities.
For example, I find that I frequently want to select all values (for specific columns) in a given table using an ORM or add an entry to the table based on a mapping.
At the same time, I want to rigorously test my databases—but not pay the penalty for reconstructing the database foreverytest.Authorizations & Database HandlersThe common operations are easy to do using SQLAlchemy, but rather than rolling new functions for each new query in every application, this tool provides a set of handlers that are designed to abstract away a bunch of the tedious details.
Also, my experience is that enforcing authorization constraints when manipulating sophisticated table relationships can be tricky, and so this tool and its handlers provide an interface for managing those authorizations consistently.It's possible I'm missing a key functionality of SQLAlchemy that enables this behavior elegantly, but I haven't found a satisfiably clean way to do it yet.
Until I become so enlightened, this package creates an interface where each model may define the chain of joins required to establish whether it belongs to an authorized user, and then a handler to query the database and perform those joins for each query.
This is designed to be extensible, since I often want this behavior available for the majority of ORM models in my application.If you read this and think "This dude's dumb; why on Earth didn't he usethisfunctionality baked into SQLAlchemy?" drop me a line because I'm interested to know what I'm missing.InstallationTheAuthanorpackage is registered on thePython Package Index (PyPI)for easy installation.
To install the package, simply run$ pip install authanorThe package requires a recent version of Python (3.9+).LicenseThis project is licensed under the GNU General Public License, Version 3.
It is fully open-source, and while you are more than welcome to fork, add, modify, etc. it is required that you keep any distributed changes and additions open-source.ChangesChanges between versions are tracked in thechangelog.
Package: authapi
AuthAPIA Simple Python API for Authenticated Operations.Quickstart:Let's assume you want to interact with Google Ads API.Createmy_secret.jsonwith the following information:{"client_id":"","client_secret":"","authorize_url":"","access_token_url":"","scopes":[]}Create amain.pyscript and paste the following content.fromauthapiimportAuthAPI,AuthDataclassJsonSecret:def__init__(self,path:str):self.path=pathdefpull(self)->dict:withopen(self.path,"r")asf:returnjson.load(f)defpush(self,payload:dict)->None:withopen(self.path,"w")asf:json.dump(payload,f)app_secret=JsonSecret("my_secret.json")app_token=JsonSecret("my_token.json")auth_data=AuthData(**app_secret.pull())app=AuthAPI(name="Auth API: My Auth API",auth_data=auth_data,token_secret=app_token,)app.debug=True@app.route("/run",methods=["GET","POST"])defrun():token=app.get_token()# Do your stuff herereturn"Done!"if__name__=="__main__":app.run(ssl_context="adhoc")Runpython main.pyand visithttps://127.0.0.1:5000/to start the authentication process.
Package: authbox
SoftwareFor the basic walkthrough of how this code works, seehttps://google.github.io/makerspace-auth/client/Walkthrough.htmlPrerequisites:Python 2.7 or 3.6+evdev(python-evdev on Debian)RPimodule (orpip install fake-rpifor testing)Make sure you're in the 'input' group to use evdevMake sure you're in the gpio group if you're on a PiDeveloping:The easiest way is to runmake setupand then. .venv/bin/activate.You can also run the tests with tox, usingtox -p allThe code is formatted with isort+black, runmake lintand/ormake formatbefore sending pull requests.ProtocolWhile using a server is optional (you can do everything with shell scripts), we
use a simple HTTP-based protocol that's intended to be easy to adapt to existing
systems. Seehttps://google.github.io/makerspace-auth/server/Protocol.htmlQA exampleThis simply flashes a light when its button is pressed.  We use this to run QA
on authboards once assembled, and is a very simple example of how the event loop
works.Two-button exampleWe determined two buttons ("on" and "off", basically) to be the minimum viable
controls, and this is the version that we use at Google.  If you're looking for
a good jumping-off point, start here.The basic workflow is:Scan badgePress "on".  Tool will power up.Warning timer commences beeps.  If you press "on" again, you get more time.Otherwise, tool powers off.You should copy (or symlink) this file to ~/.authboxrc and make edits to conform
to your pin numbers.  The defaults are for an RDR-6081AKU (keystroking) and
pi-hat-1 v1.0 hardware triggering both onbarod relays to enable devices.This example out of the box stores authorized users in a local file
(Seesample_auth_check.sh) but you likely want it to query your existing
user/training database.  If you'd like to use the same protocol, that's
documented athttps://google.github.io/makerspace-auth/server/Protocol.htmland if you use
curl, remember the '-f'.Starting on bootThe simplest way that works on all distros is a cron job:# Visually
pi$ crontab -e
(add the following line at the end, save, and apply)
@reboot cd /path/to/software; python two_button.py

# Through script
pi$ (crontab -l; echo "@reboot cd /path/to/software; python two_button.py") | crontab -If your distro uses systemd, you can also make a systemd unit that runs it.
Package: authcaptureproxy
Auth_capture_proxyA Python project to create a proxy to capture authentication information from a webpage. This is useful to capture oauth login details without access to a third-party oauth.InstallpipinstallauthcaptureproxyUsingTo see basic usage look at theproxy-examplethat logs into Amazon.com and will print out the detected email and password.pythonauthcaptureproxy/cli.pyproxy-exampleSee the docs 📚for more info.LicenseLicensed under the terms of theApache License 2.0.ContributingNew issuesand pull requests are welcome.
Please refer to thecontributing guideandsecurity policy.Generated withTyrannosaurus.
Package: authcodecatcher
authcodecatcherA server for exchanging OAuth Codes for TokensDescriptionIf an open or hijackable redirect URI is discovered for an entra application, authcodecatcher can serve as a server at the hijackable URL to catch auth codes and exchange them for tokens. The user will be redirected to the configurable landing page. PKCE is supported.Installationpip install authcodecatcherUsageFirst, an SSL certificate needs to be created if you don't have one alreadyopenssl req -new -x509 -keyout cert.pem -out cert.pem -days 365 -nodesNext, run the module with the required argumentspython3 -m authcodecatcher.server --client-id <ID of hijackable app registration> --tenant-id <target tenant ID> --redirect-uri <The hijackable URI that you control> --port <The port to listen on> --cert-file <The PEM certificate file created in the previous step>Lastly, generate a URL that will be sent to the targetcurl https://localhost:1337/generateurlThe output will be JSON with a URL that contains the authorization endpoint. If an authenticated user navigates to this URL, authcodecatcher will obtain the auth code and exchange it for an access token. All access tokens are saved to a JSON file 'tokens.json' by default.Command Options--redirect-uriThe hijackable URI that the attacker controls. Must be listed in the application registration.--scopeThe requested scope of the JWT. Defaults tohttps://graph.microsoft.com/.default+offline_access--urlpathThe path of the redirect-uri. For example, if the redirect-uri ishttps://test.example.com/oauth/token, then the --urlpath should be set to/oauth/token.--portThe port on which the server will listen--client-idThe client ID (application ID) of the targeted Entra application.--tenant-idThe target tenant ID--output-fileThe file that authcodecatcher will write tokens and pkce codes to.--cert-fileThe certificate file to use for SSL--landing-pageThe page that the user will be redirected to after the code exchange. Defaults tohttps://en.wikipedia.org/wiki/Snallygaster.
Package: authconnector
The goal of this project is to have a reusable component that allow us to authenticate against a
microservice for user management. This will take the JWT token that was send in the request
Authorization header and it will use it to retrieve the user information and store it in the
local user database.Quick startInstall the project by doingpip install authconnectorInstall the usual django migrations.Add the app to the django INSTALLED_APPS:‘remoteauth’Add the next configuration on the django settings:INMOBILIO_AUTHENTICATION_SERVICE = {
‘JWT_VALIDATION_URL’: ‘http://localhost:9000/auth/user’
}Done :DYou can now retrieve the user within the request to your API endpoints.
Package: auth-cord
Auth CordPython Wrapper for discords oauth2Key FeaturesSupport for the following endpoints- exchange code for token- refresh token- get user connections- get user guilds- get user infoInstallingPython 3.8 or higher is requiredInstall from pippython -m pip install -U auth-cordInstall from githubpython-mpipinstall-Ugit+https://github.com/cibere/auth-cord# requires git to be installedFAQQ: I don't have a webserver, can I still use discords oauth?A: Yes! You can set the redirect_url tohttps://api.cibere.dev/auth_cord, and tell the user to give your bot the given code.ExamplesGet user infoimportasyncioimportauth_cord# creating our authorization objectauth=auth_cord.Authorization(client_id=123,client_secret="...",redirect_url="...",)# creating our client instance and passing our authorizationclient=auth_cord.Client(authorization=auth)asyncdefmain():# starting our clientasyncwithclient:# exchanging our code with discord for a tokentoken=awaitclient.exchange_code("...")# getting the users connectionsuser=awaitclient.get_user_info(token.token)# 'token' is a 'auth_cord.token.Token' object# printing the users idprint(user.id)# checking if this file is the one that was runif__name__=="__main__":# if so, run the main functionasyncio.run(main())Seethe examples folderfor a full list of examples
Package: auth-dtaas
Auth MicroserviceInstall the microservice:pipinstallauth-dtaas==0.1.0Python CLI usageSetupOn your terminal, switch to Python CLIpythonThen, import theauthpackage:fromauth_dtaasimportauthYou can now use functions of the Auth microservice.Register/Authorize new sessionauth.authorization()Follow the guide:Paste the displayed link in a web browserIf requested, approve access via Gitlab.Paste the link you are redirected to, into the terminal.Thestateandaccess_tokenfor this session
will be displayed.Copy/Save these for later use.Validating existing sessionauth.validation(state,access_token)Provide thestateandaccess_tokenof the session requesting validation, as parameters.In case of successful validation, your account
information will be displayed. Confirm that this is
the correct account before proceeding.Response codes will be returned by this function:200 : OK, User Validated403 : User validation has expired, Requires re-authorization404 : New user/ User is not validationExitTo exit the Python CLI:exit()
Package: authentic
Comprehensive Authentication PackageFree software: BSD 3-Clause LicenseInstallationpip install authenticDocumentationhttps://authentic.readthedocs.io/Developmentpyenv virtualenv -p python3.7 3.7.5 protean-flask-devTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.1 (2018-08-02)First release on PyPI.0.0.6 (2018-12-28)Pre-Prod release on PyPI.0.0.6a (2019-01-31)Use correct keys for errors in password change usecases.0.0.9 (2019-03-11)Sync with protean 0.0.9
Package: authentic2-auth-kerberos
Authentic2 Auth KerberosIt provides basic implementation of the HTTP Negotiate authentication mechanism
and autologin support using Javascript and a cookie.Thedjango-kerberosproject is used as a basis for this plugin.InstallYou just have to install the package in your virtualenv and relaunch, it will
be automatically loaded by authentic2.You must define the KRB5_KTNAME environment to the path of a keytab file
containing the key for your service principal. Seedjango-kerberosdocumentation for details.SettingsA2_AUTH_KERBEROS_ENABLED: enable the authentication module, default is True.A2_AUTH_KERBEROS_CREATE_USER: whether to create users for Kerberosprincipals, default is True.A2_AUTH_KERBEROS_REALM: default reaml to attribute to user, default is None.If not None, the Kerberos realm is replaced by this one. It’s incompatible
with support for multiple realms.LDAP_AUTH_SETTINGS: same settings than for other usages in Authentic2, the Kerberos backend
introduce a new key ‘principal_filter’ which is a str.format() template receiving two keyword
arguments, username (the local part of the principal) and realm.Changelog1.1.0use a2_just_logged_out to authorize automatic login and hide login tabadd LDAP backend1.0.0initial release
Package: authentic2-idp-freshdesk
Authentic2 Freshdesk login==========================This plugin allows Authentic2 IDP to log your users to freshdesk throughfreshdesk simple SSO mechanism.Install-------You just have to install the package in your virtualenv and relaunch, it willbe automatically loaded by authentic2.### Freshdesk configuration- Go to https://yourcompany.freshdesk.com/admin/security- enable *SSO simple*- In *Remote login URL* put something like`https://myidp.example.com/idp/freshdesk/login/`- In *Remote logout URL* put something like`https://myidp.example.com/idp/logout/`- Note down the shared secret### Authentic configurationSet in your *local_settings.py* the following settings according to yourfresdhesk site.FRESHDESK_URL = 'http://yourcompany.freshdesk.com'FRESHDESK_SECRET_KEY = 'XXXXXXXXXXXX'### Diverting some users to somewhere elseYou may need to authorize freshdesk access only for a subset of your users,willing to redirect others to a custom URL (ex: custom error page). There is the`FRESHDESK_DIVERT` setting for that.you should point it to an object instance with two methods :should_divert(email) and divert_url(email), for ex:class TestDiverter():def should_divert(self, user):""":returns True if the user should be diverted out of FD false elseif user.email == 'foobar@example.com':return Trueelse:return Falsedef divert_url(self, user, request):""":returns an url, the diversion path, the system will HTTP 302 there."""return 'http://example.com/{}'.format(user.email)And in your `local_settings.py`FRESHDESK_DIVERT='mymodule.TestDiverter'
Package: authentication
Authentification blueprint package for flaskBlueprint defines object User who can register, log in, and log out.
User can also update its profile. The data is stored on redis database.InstallingTo install a package, open the terminal and download the GitHub repository:$  pip3 install --user git+https://github.com/kate-melnykova/authenticationThe database for the package is redis, so please make sure that it is started prior to using the package.Getting startedCreate a python project with the following minimal structure- templates
  -- base.html
- app.pyThe fileapp.pycreates a basicflaskapp and registers the blueprintfrom flask import Flask
from authentication import auth

app = Flask(__name__, instance_relative_config=True)
app.register_blueprint(auth)andbase.htmlcontains the base style:<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        {% block form %}
        {% endblock %}
    </div>
</body>
</html>Open the terminal and run$ export FLASK_APP=app.py
$ flask runThe server will run the app. Note that only pages 'login', '
logout', 'register', and 'update_user' exist.
Package: authentication-factory
authentication-factoryNote: This is inital version of the factory with support of Microsoft OAuth2.0 only with Streamlit.authentication-factory is a simple python implementation of authentication using below listed authentication mechanism.Microsoft OAuth2.0This extension helps to implement authentication solutions and provides
login url, logout url and id token.
These can be used in python web application like Streamlit, Flask etc.Getting StartedInstallationpipinstallauthentication-factoryUsageStreamlitDevelopment SetupUsing virtualenvpython3-mvenvvenvsourceenv/bin/activate
pipinstall.ContributingFork repo-https://github.com/shrivastava-v-ankit/authentication-factory.gitCreate your feature branch -git checkout -b feature/nameAdd Python test (pytest) and covrage report for new/changed feature.Commit your changes -git commit -am "Added name"Push to the branch -git push origin feature/nameCreate a new pull request
Package: authenticator-backup
Authenticator BackupTool to backup (and restore)Google Authenticatorto GPG encrypted files.NOTE: This has only been tested on Linux.  If you find any issues or would
like to share any solutions,please submit an issue.QuickstartSystem DependenciesYou will need to haveopencvandgpginstalled on your system for this
package to work.  You should install them before installing this package.  For
instance, on Arch Linux (other distributions may use different package managers
or package names):pacman -S opencv gnupgInstall Authenticator Backup:pip install --user authenticator_backupBackupYou'll need the public key for the PGP account(s) that can decrypt the file (the
recipients).  Each one separated by a space.python -m authenticator_backup backup 636ABA5F59810D7D97EF05035B705B8C90A02377 > /tmp/backup.txtThis will open a Window displaying video from  your Web cam to scan the export
QR code with.  To get this code:Open up Google AuthenticatorTap the triple-dot in the top right-hand cornerTap "Transfer Accounts"Tap "Export Accounts"Select the accounts you want to backup (probably all of them), and tap "Next"Show this code to your Web camThe window will close and the encrypted backup will be output once it
successfully captures the QR code.RestoreTo restore, the recipient GPG account must be on the system to decrypt it.cat /tmp/backup.txt | python -m authenticator_backup restoreThis will display a QR code yo ucan scan with Google Authenticator to re-import
the accounts.DO NOT DISPLAY THIS IN A PUBLIC PLACEOpen up Google AuthenticatorTap the triple-dot in the top right-hand cornerTap "Transfer Accounts"Tap "Import Accounts"Tap "Scan QR code"Scan QR code displayed in the windowClose the window when completeIf you had a lot of accounts, multiple windows showing QR code may be displayed,
one after another.
Package: authenticatorpy
authenticatorpyLinuxWindowsIntroductionA pure Python library which provides one time password like Google Authenticator. It works with Python versions Python 3.x.InstallingYou can install authenticatorpy using:$ pip install authenticatorpyGetting the codeThe code is hosted athttps://github.com/abdullahselek/authenticatorpyCheck out the latest development version anonymously with:$ git clone git://github.com/abdullahselek/authenticatorpy.git
$ cd authenticatorpyTo install test dependencies, run either:$ pip install -Ur requirements.testing.txtRunning TestsThe test suite can be run against a single Python version which requirespip install pytestand optionallypip installpytest-cov(these are included if you have installed dependencies fromrequirements.testing.txt)To run the unit tests with a single Python version:$ py.test -vto also run code coverage:$ py.test --cov=authenticatorpyTo run the unit tests against a set of Python versions:$ toxSample UsageImport Authenticator:from authenticatorpy.authenticator import AuthenticatorInitiation:authenticator = Authenticator('abcd xyzw abcd xyzw abcd xyzw abcd xyzw')
password = authenticator.one_time_password()And that’s it, you have the unique password.Command Line UsageWith--secretparameter default 30 seconds regeneration interval:python -m authenticatorpy --secret 'abcd xyzw abcd xyzw abcd xyzw abcd xyzw'or additional--timeparameter:python -m authenticatorpy --secret 'abcd xyzw abcd xyzw abcd xyzw abcd xyzw' --time 15Relevant RFCsRFC4226RFC6238LicenseMIT LicenseCopyright (c) 2018 Abdullah SelekPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: authentikate
authentikateDEVELOPMENTThis project is currently under development, and tightly integrates with the arkitekt project. While we are working on a more generic solution, the project API SHOULD be considered unstable. Please use at your own risk, and consider other solutions.IdeaAuthentikate is a library that provides a simple interface to validate tokens and retrieve corresponding
user information inside a django application.UsageIn order to initialize a herre client you need to specify a specific grant to retrieve the access_token. A grant constitutes a way of retrieving a Token in an asynchronous manner.InstallationpipinstallauthentikateConfigurationINSTALLED_APPS=["django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles","guardian","authentikate",]AUTH_USER_MODEL="authentikate.User"AUTHENTIKATE={"KEY_TYPE":"RS256","PUBLIC_KEY_PEM_FILE":"public_key.pem","FORCE_CLIENT":False,}Authentication is done by using theauthenticate_tokenmethod. This method takes a token and returns a user object if the token is valid. Otherwise it returnsNone.```pythonfromauthentikateimportauthenticate_token,authenticate_headersdefmy_view(request):auth=authenticate_headers(request.HEADERS)ifuserisnotNone:# do something with userelse:# do something else