Saravanan666/pypi-org huggingface dataset:
Package: django-authen
django-authen 2.0.0--------------------Authen is a simple Django **login** and **logout** page written with **bootstrap-4**Quick start-----------1. How to install```pip install django-authen```2. Add **authen** **django_python3_ldap** and to your INSTALLED_APPS in **settings.py**```INSTALLED_APPS = [...'django_python3_ldap','authen',]```3. Include the **authen** urls in your projects **urls.py**```path('authen/', include('authen.urls')),```4. Set **LOGIN_URL** to authen login url in **settings.py**```LOGIN_URL = "/authen/login/"```5. Set **AUTHEN** configuration in **settings.py**```AUTHEN = {"COMPANY_NAME": "Your Company Name","LOGIN_TITLE": "Login w/ your id","LOGOUT_TITLE": "Logged out.","LOGOUT_MESSAGE": "Thanks for spending some quality time with the our site today.",}```5. Finally run migration```python manage.py migrate```6. Visit `/authen/login/` for login and `/authen/logout/` for logout page on browser.-----------Screenshots-----------|           login            ||----------------------------|| ![login](assets/login.png) ||           logout           ||----------------------------||![logout](assets/logout.png)|-----------```Copyright 2018 semiworld.orgPermission 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: django-authentication-service
Authentication Service BackendA django rest authentication service backend that handles storage of users account and authentication of their identities.EndpointsHere are it's key features:RegisterLogin (JWT)Login (Refresh JWT)Request EmailVerify Email (Uid & Token)LogoutChange PasswordReset PasswordReset Password CompleteSuspend UserAPI SchemaDownload and Import theschemato your favourite API testing tool (postman, insomnia, etc) to get the endpoints and expected payload.RequirementsPython (3.8, 3.9.*)Django (2.2, 3.0, 3.1, 3.2, 4.*)Quick Start1). Install usingpip:pipinstalldjango-authentication-service2). Addauthentication_serviceto yourINSTALLED_APPSsetting:INSTALLED_APPS=[..."authentication_service",]Make sure that you havedjangorestframework,djangorestframework-simplejwtanddrf-yasginstalled in your apps.INSTALLED_APPS=[# django installed apps...# already added to installed_apps"rest_framework","rest_framework.authtoken","rest_framework_simplejwt",# this will help document the apis using either swagger or redoc"drf_yasg",# new line"authentication_service",]3). Configure theAUTH_USER_MODELin the setting:AUTH_USER_MODEL="authentication_service.AccountUser"4). Register the account user model to the admin; if you don't want to - set it to False:REGISTER_USER_MODEL=True# this will show the user model on the django admin5). In order to use the pre-built email templates, you'd have to include the name of your site (or product name) and the contact email:AUTHENTICATION_SERVICE={"site_name":"Authentication Service","contact_email":"contact@authentication-service.com"}6). Include theauthentication_serviceURLs in your project urls.py:path('auth/',include('authentication_service.urls')),7). Runpython manage.py migrateto create new migrations based on the changes on the model.8). Start the development server:pythonmanage.pyrunserver8080Documentation & SupportIf you find a code smell, or bad practice(s) anywhere while exploring through the codebase - kindly create an issue stating what it is; or fix the code smell, bad practice or whatever it is you found. As the saying goes, multiple heads are better than one.winksLicenseDisclaimer:Everything you see here is open and free to use as long as you comply with thelicense. There are no hidden charges. We promise to do our best to fix bugs and improve the code quality.
Package: django-authenticator-gdaley
JupyterHub django-session-authenticator - A Django Session Authenticator for JupyterHubAuthenticate to JupyterHub using an active Django login session, which was created by a Django-based service running on a server in the same domain as the JupyterHub service.PrerequisitesThe main purpose of this authenticator is to provide single sign-on (SSO) capability into JupyterHub, in cases where users are already authenticating with a web application based on the Django framework. This is a simpler alternative to a more centralized authentication solution, such as Cognito.To allow this JupyterHub (and this authenticator) to "see" the session cookie generated by Django:Django and JupyterHub must be hosted under the same domain. For example, django.hostname.com and jupyterhub.hostname.comDjango's SESSION_COOKIE_DOMAIN must be set to allow cross-domain cookies. For example, hostname.comNote that only MySQL database-backed sessions are supported at present.InstallationThis package can be installed with pip:pip install django-authenticator-gdaleyAlternately, you can clone the source repository and run:cd django-authenticator
pip install -e .ConfigurationYou should edit your filejupyterhub_config.pyto set the authenticator class. The DjangoSessionLocalAuthenticator provides features such as local user creation. If you already have local users then you may use the DjangoSessionAuthenticator authenticator class, as follows:For authentication and local user creationc.JupyterHub.authenticator_class = 'djangoauthenticator.djangoauthenticator.DjangoSessionLocalAuthenticator'This class is derived from LocalAuthenticator and therefore provides features such as the ability to add local accounts through the admin interface if configured to do so.For authentication of the Django session onlyc.JupyterHub.authenticator_class = 'djangoauthenticator.djangoauthenticator.DjangoSessionAuthenticator'Required configurationThere are a number of configuration settings, which need to be made. The name of the session cookie used by Django is optional. If you are using the default session cookie name ("sessionid"), there is no need to set it here.# Django session cookie name
c.DjangoSessionAuthenticator.django_session_cookie_name = '<insert-session-cookie-name-here>'
# Django MySQL database hostname
c.DjangoSessionAuthenticator.mysql_hostname = '<insert-db-hostname-here>'
# Django MySQL username
c.DjangoSessionAuthenticator.mysql_username = '<insert-db-username-here>'
# Django MySQL password
c.DjangoSessionAuthenticator.mysql_password = '<insert-db-password-here>'IssuesIf you have any issues or bug reports, all are welcome in the issues section. We'll do our best to respond quickly.ContributionIf you want to fix the bugs yourself then raise a PR and we'll take a look :)
Package: django-auth-exchange
Documentation:https://django-auth-exchange.readthedocs.ioSource:https://github.com/gregschmit/django-auth-exchangePyPI:https://pypi.org/project/django-auth-exchange/Auth Exchange is a reusable Django app that allows you to authenticate users
against an Exchange/Office365 server (usingexchangelib).The Problem: I don’t want users of my app to remember another password.The Solution: This app allows those users to authenticate using their
Exchange email credentials.How to Use$pipinstalldjango-auth-exchangeIncludedjango_auth_exchangein yourINSTALLED_APPS.Adddjango_auth_exchange.backends.ExchangeAuthBackendto yourAUTHENTICATION_BACKENDS, e.g.:AUTHENTICATION_BACKENDS=['django_auth_exchange.backends.ExchangeAuthBackend','django.contrib.auth.backends.ModelBackend',]Configure at least one domain:AUTH_EXCHANGE_DOMAIN_SERVERS={'example.org':'autodiscover',}SettingsAUTH_EXCHANGE_CREATE_UNKNOWN_USER(default:True) - Determines
if users should be created if they are not found in the local database.AUTH_EXCHANGE_DEFAULT_DOMAIN(default:'example.com') - If only
a username is provided, this is the default domain that will be associated.AUTH_EXCHANGE_ALLOWED_FORMATS(default:['email', 'netbios', 'username']) - This specifies which formats are
allowed as the username (email meanssomeuser@example.com, netbios meansEXAMPLE\someuser, and username meanssomeuser).AUTH_EXCHANGE_DOMAIN_SERVERS(default:{}) - This specifies the
domains which are allowed to authenticate and the server that should be used for
authentication (or'autodiscover'). Hint: Office365 uses the serveroutlook.office365.com.AUTH_EXCHANGE_DOMAIN_USER_PROPERTIES(default:{}) - This
specifies the settings we should apply to a user when they are added to the
local database for each domain (e.g., to make allexample.comusers
superusers, do:{'example.com': {'is_staff': True, 'is_superuser': True}}).AUTH_EXCHANGE_NETBIOS_TO_DOMAIN_MAP(default:{}) - This
specifies a mapping from NETBIOS names to domain names.ContributingEmailgschmi4@uic.eduif you want to contribute. You must only contribute code
that you have authored or otherwise hold the copyright to, and you must
make any contributions to this project available under the MIT license.To collaborators: don’t push using the--forceoption.
Package: django-auth-exchange-organizations
Source:https://github.com/gregschmit/django-auth-exchange-organizationsPyPI:https://pypi.org/project/django-auth-exchange-organizations/Auth Exchange Organizations is an extension to Auth Exchange
(https://github.com/gregschmit/django-auth-exchange) that allows
users/domains to be associated to Organizations fromdjango-organizations.How to Use$pipinstalldjango-auth-exchange-organizationsIncludedjango_auth_exchange_organizationsin yourINSTALLED_APPS.You can create associations by creating DomainOrganization objects in the Admin
UI. You’ll need to configuredjango-auth-exchangebefore you can test
this app out.SettingsAUTH_EXCHANGE_ORGS_AUTOASSOCIATE(default:True) - Whether
organization association should be automatic.AUTH_EXCHANGE_ORGS_AUTO_CREATE_ORGS(default:True) - Whether
organizations/associations should be created if they don’t exist.ContributingEmailgschmi4@uic.eduif you want to contribute. You must only contribute code
that you have authored or otherwise hold the copyright to, and you must
make any contributions to this project available under the MIT license.To collaborators: don’t push using the--forceoption.
Package: django-auth-gitlab
This is a Django login view that authenticates against GitLab.Use it if you own a single GitLab instance that you want to use as
a OAuth Authentication Server between multiple apps.See alsodjango-auth-oidc.RequirementsPython 3.6+.Python 2 is not supported, and won’t ever get supported.Django 1.10+Installationpipinstalldjango-auth-gitlabsettings.pyINSTALLED_APPS+=['django_auth_gitlab']urls.pyurlpatterns+=[url(r'^accounts/login/',include('django_auth_gitlab.urls')),]ConfigurationGitLabApp’s redirect URI: http(s)://app-domain/accounts/login/callbackApp’s environment variablesGITLAB_SERVER - Gitlab Server URL - with trailing slash.GITLAB_CLIENT_ID - Client ID received from GitLabGITLAB_CLIENT_SECRET - Client secret received from GitLab
Package: django-auth-hack
django-auth-hackThis is a Django application for hacking the builtindjango.contrib.authapplication.
This app aims to add support to a longer username field onUsermodel.Installation and configurationTo install this app you need first to add it to your environment using pip:$ [sudo] pip install django-auth-hackThen you need to add theauth_hacksontopof yourINSTALLED_APPS, before any other application:INSTALLED_APPS = (
    'auth_hacks',
    # other apps
)You can customize the new username max length by defining  theUSERNAME_MAX_LENGTHin your settings file:USERNAME_MAX_LENGTH = 255DatabaseMake sure you alter the columnusernamein the tableauth_user. You can use South or run anALTER TABLESQL manually. Using MySQL, you could run:ALTER TABLE auth_user MODIFY COLUMN auth_user VARCHAR(255) NOT NULL;
Package: django-auth-http-basic
DescriptionThis module provides the client side for a HTTP Basic Authentication provider
to allow authentication for a Django application. It must be installed as a
Django authentication backend.This allows to authenticate your Django application with the help of a web
server that already provides HTTP Basic Authentication, as it is described in
[RFC2617](https://www.ietf.org/rfc/rfc2617.txt). Web servers, such as Apache
or Nginx, can easily be configured to adapt complex authentication scenarios,
e.g. authentication via a combination of LDAP and manual filters. Your Django
project is now able to utilize such a configuration.InstallationAdd this module to yoursetup.pyand/or torequirements.txtfile:# …
django-auth-http-basic
# …You need at least Django >= 1.10.ConfigurationIn yoursettings.pyfile, you must add/set the variableAUTHENTICATION_BACKENDSso that it includes the authentication backend, e.g.:AUTHENTICATION_BACKENDS = [‘django_auth_http_basic.HttpBasicAuthBackend’]In addition, you must specify an URL that provides HTTP Basic Authentication by
providing a value for the variableHTTP_BASIC_AUTH_URLin yoursettings.pyfile, e.g.:HTTP_BASIC_AUTH_URL = ‘https://example.com/auth’As long as the web services conforms to HTTP Basic Authentication, it could be
used as an authentication backend. Since HTTP Basic Authentication transports
user name and password in clear text, you should access it via HTTPS. If the
web server is on your local host, you might use unencrypted HTTP.The web server is expected to return a 401 response, if no user name and/or
no password is provided. It must return a 2xx response if the user is
authenticated, and a 403 response if the user is not authenticated. Currently,
every response code except 2xx will be interpreted as a failed authentication.
Most web servers conform to this rule. However, you are free to implement your
own authenticating web server.For testing purposes,HTTP_BASIC_AUTH_URLcan be set toNone. In this case
no web server will be contacted, every user will be authenticated. Please be
sure to changeHTTP_BASIC_AUTH_URLto a valid URL for production code.If you don’t set the variableHTTP_BASIC_AUTH_URLto any value, no user will
be authenticated. In this case, an error message will be sent to the logger
nameddjango-auth-http-basic.Another (optional) variable you can use in yoursettings.pyisHTTP_BASIC_AUTH_CASE. This value specifies, whether the user name will be
handled case-sensitive or case-insensitive in the backend. Its value itself
is treated case-insensive. Only its first letter is analysed. If it is a ‘0’,
‘f’ or ‘n’, then the user name will be folded to lower-case. If you omit this
variable, a value ‘yes’ is assumed.
Package: django-auth-ldap-ng
This is a Django authentication backend that authenticates against an LDAP
service. Configuration can be as simple as a single distinguished name template,
but there are many rich configuration options for working with users, groups,
and permissions.This version is supported on Python 2.6, 2.7, 3.4 and 3.5; and Django >= 1.7.
Under Python 2, it requirespython-ldap>= 2.0; under Python 3, it usespyldap.Full documentation can be found athttp://pythonhosted.org/django-auth-ldap/; following is an example
configuration, just to whet your appetite:import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType


# Specify User Profile Model if profile needs to be populated (Optional)
AUTH_PROFILE_MODULE = 'account.UserProfile'

# Baseline configuration.
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"

AUTH_LDAP_BIND_DN = "cn=django-agent,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "phlebotinum"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
    ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
# or perhaps:
# AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=users,dc=example,dc=com"

# Set up the basic group parameters.
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=django,ou=groups,dc=example,dc=com",
    ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
)
AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()

# Simple group restrictions
AUTH_LDAP_REQUIRE_GROUP = "cn=enabled,ou=django,ou=groups,dc=example,dc=com"
AUTH_LDAP_DENY_GROUP = "cn=disabled,ou=django,ou=groups,dc=example,dc=com"

# Populate the Django user from the LDAP directory.
AUTH_LDAP_USER_ATTR_MAP = {
    "first_name": "givenName",
    "last_name": "sn",
    "email": "mail"
}

AUTH_LDAP_USER_FLAGS_BY_GROUP = {
    "is_active": "cn=active,ou=django,ou=groups,dc=example,dc=com",
    "is_staff": "cn=staff,ou=django,ou=groups,dc=example,dc=com",
    "is_superuser": "cn=superuser,ou=django,ou=groups,dc=example,dc=com"
}

# Populate user profil model from LDAP Directory
AUTH_LDAP_PROFILE_ATTR_MAP = {
    'description': 'description',
    'type': 'employeeType',
}

# Populate profile fields by matching if regex matches the user DN
AUTH_LDAP_PROFILE_FLAGS_BY_DN_REGEX = {
    "is_awesome": r"ou=awesome,ou=people,dc=example,dc=com",
    "is_teacher": r"ou=faculty,dc=example,dc=com",
}


# Use LDAP group membership to calculate group permissions.
AUTH_LDAP_FIND_GROUP_PERMS = True

# Cache group memberships for an hour to minimize LDAP traffic
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600


# Keep ModelBackend around for per-user permissions and maybe a local
# superuser.
AUTHENTICATION_BACKENDS = (
    'django_auth_ldap.backend.LDAPBackend',
    'django.contrib.auth.backends.ModelBackend',
)
Package: django-auth-logger
This is a modest Django app that contains how thelab likes to log authentication for staff users. It may be useful to others, but could easily just be copied.InstallFirst, install the package from PyPI.pipinstalldjango-auth-loggerThen, addauth_loggerto your Django project’sINSTALLED_APPSsetting.INSTALLED_APPS=[...'auth_logger',...]UsageBy default both successful and failed log-ins are logged to standard Python logging (atINFOlevel).In the future we may decide to add more configuration options.ContributionThe scope of this project is small and specific - but we welcome adding configuration settings to change behavior and meet more use cases. All configuration options should have a test to verify it works.If we do add said configuration it will probably look something like this:AUTH_LOGGER={'LOG_ONLY_STAFF':True}Changelog2.2.0Support django-ipware v42.1.0Add Django 3.2 to test suite2.0.0Update to django-ipware v31.1.1Update test suite for with Django 2.2 and Python 3.81.1.0Log all login attempts, instead of just logins for staff users.Fix bug which prevented failed login attempts from being correctly logged.1.0.1Add support for Django 2.0.1.0.0Initial release.
Package: django-authmiddleware
AuthMiddlewareA Django middleware to enforce user login before accessing certain views.SetupYou can install django-authmiddleware frompipusingpipinstalldjango-authmiddlewareand then add it to your middleware using:MIDDLEWARE = [
    ...
    'AuthMiddleware.middleware.AuthRequiredMiddleware',
    ...
]Make sure you add the trailing comma or you might get aImproperlyConfiguredException.ConfigurationConfigure the middleware's behaviour in your Django project's settings. The middleware expects aAUTH_SETTINGSsetting within Django settings to work properly. You must
set the following keys withinAUTH_SETTINGS:LOGIN_URLDEFAULT_REDIRECT_URLLOCK_URLSREDIRECT_AFTER_LOGINLOGIN_URLA URL name that is used for login in your django project. Defaults tologin.AUTH_SETTINGS = {
    ...
    "LOGIN_URL" : "example"
    ...
}DEFAULT_REDIRECT_URLA URL name to which users are redirect if they try to access an invalid URLs. Defaults toNone.When set toNone, no redirects take place and error is generated for invalid URLs.AUTH_SETTINGS = {
    ...
    "DEFAULT_REDIRECT_URL" : "example"
    ...
}LOCK_URLSA set of URL names to which access is restricted. Access to these URLs is given only on successful login. Default to empty set{}.AUTH_SETTINGS = {
    ...
    "LOCK_URLS" : {
        "example-1",
        "example-2",
        "example-3",
        ...
        }
    ...
}REDIRECT_AFTER_LOGINIf set toTrue, user is redirected to original page after successful login. Adds?nextparameter to URL request. Defaults toTrue.AUTH_SETTINGS = {
    ...
    "REDIRECT_AFTER_LOGIN" : False,
    ...
}ContributingContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request
Package: django-auth-mixins
# Django Auth MixinsBackport of Django 1.9 [auth
mixins](https://github.com/django/django/blob/1.9.4/django/contrib/auth/mixins.py)
for Django 1.8.x LTS:LoginRequiredMixinPermissionRequiredMixinUserPassesTestMixin## Usagefrom auth_mixins import LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin## Docshttps://docs.djangoproject.com/en/1.9/topics/auth/default/#the-loginrequired-mixinhttps://docs.djangoproject.com/en/1.9/topics/auth/default/#the-permissionrequiredmixin-mixinhttps://docs.djangoproject.com/en/1.9/topics/auth/default/#django.contrib.auth.mixins.UserPassesTestMixin## LicenseLike Django, seeLICENSEfile.
Package: django-auth-network-client
Django Auth Network (DAN) is a set of two packages that create Google and Facebook-style authentication, but using your own provider instead of Google or Facebook. This is the client package, and it allows an app to connect to your provider package.DocumentationThe full documentation is athttps://django-auth-network-client.readthedocs.io.QuickstartInstall Django Auth Network Client:pip install django-auth-network-clientAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_auth_network_client.apps.DjangoAuthNetworkClientConfig',...)Add Django Auth Network Client’s URL patterns:fromdjango_auth_network_clientimporturlsasdjango_auth_network_client_urlsurlpatterns=[...url(r'^',include(django_auth_network_client_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-07-04)
0.2.0 (2017-07-23)
++++++++++++++++++First release on PyPI.