You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

auth0-python

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-python - pypi Package Compare versions

Comparing version
4.1.0
to
4.1.1
+1
-1
auth0_python.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: auth0-python
Version: 4.1.0
Version: 4.1.1
Summary: Auth0 Python SDK

@@ -5,0 +5,0 @@ Home-page: https://github.com/auth0/auth0-python

@@ -1,2 +0,2 @@

__version__ = "4.1.0"
__version__ = "4.1.1"

@@ -3,0 +3,0 @@ from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError

@@ -121,5 +121,5 @@ from .base import AuthenticationBase

password,
scope,
realm,
audience,
scope=None,
realm=None,
audience=None,
grant_type="http://auth0.com/oauth/grant-type/password-realm",

@@ -138,4 +138,2 @@ ):

Args:
audience (str): The unique identifier of the target API you want to access.
username (str): Resource owner's identifier

@@ -145,8 +143,10 @@

scope(str): String value of the different scopes the client is asking for.
scope(str, optional): String value of the different scopes the client is asking for.
Multiple scopes are separated with whitespace.
realm (str): String value of the realm the user belongs.
realm (str, optional): String value of the realm the user belongs.
Set this if you want to add realm support at this grant.
audience (str, optional): The unique identifier of the target API you want to access.
grant_type (str, optional): Denotes the flow you're using. For password realm

@@ -153,0 +153,0 @@ use http://auth0.com/oauth/grant-type/password-realm

import aiohttp
from ..asyncify import asyncify
from .auth0 import modules
from .auth0 import Auth0

@@ -23,4 +23,4 @@

self._services = []
for name, cls in modules.items():
cls = asyncify(cls)
for name, attr in vars(Auth0(domain, token, rest_options=rest_options)).items():
cls = asyncify(attr.__class__)
service = cls(domain=domain, token=token, rest_options=rest_options)

@@ -27,0 +27,0 @@ self._services.append(service)

@@ -1,2 +0,1 @@

from ..utils import is_async_available
from .actions import Actions

@@ -33,36 +32,3 @@ from .attack_protection import AttackProtection

modules = {
"actions": Actions,
"attack_protection": AttackProtection,
"blacklists": Blacklists,
"branding": Branding,
"client_credentials": ClientCredentials,
"client_grants": ClientGrants,
"clients": Clients,
"connections": Connections,
"custom_domains": CustomDomains,
"device_credentials": DeviceCredentials,
"email_templates": EmailTemplates,
"emails": Emails,
"grants": Grants,
"guardian": Guardian,
"hooks": Hooks,
"jobs": Jobs,
"log_streams": LogStreams,
"logs": Logs,
"organizations": Organizations,
"prompts": Prompts,
"resource_servers": ResourceServers,
"roles": Roles,
"rules_configs": RulesConfigs,
"rules": Rules,
"stats": Stats,
"tenants": Tenants,
"tickets": Tickets,
"user_blocks": UserBlocks,
"users_by_email": UsersByEmail,
"users": Users,
}
class Auth0:

@@ -83,7 +49,39 @@ """Provides easy access to all endpoint classes

def __init__(self, domain, token, rest_options=None):
for name, cls in modules.items():
setattr(
self,
name,
cls(domain=domain, token=token, rest_options=rest_options),
)
self.actions = Actions(domain, token, rest_options=rest_options)
self.attack_protection = AttackProtection(
domain, token, rest_options=rest_options
)
self.blacklists = Blacklists(domain, token, rest_options=rest_options)
self.branding = Branding(domain, token, rest_options=rest_options)
self.client_credentials = ClientCredentials(
domain, token, rest_options=rest_options
)
self.client_grants = ClientGrants(domain, token, rest_options=rest_options)
self.clients = Clients(domain, token, rest_options=rest_options)
self.connections = Connections(domain, token, rest_options=rest_options)
self.custom_domains = CustomDomains(domain, token, rest_options=rest_options)
self.device_credentials = DeviceCredentials(
domain, token, rest_options=rest_options
)
self.email_templates = EmailTemplates(domain, token, rest_options=rest_options)
self.emails = Emails(domain, token, rest_options=rest_options)
self.grants = Grants(domain, token, rest_options=rest_options)
self.guardian = Guardian(domain, token, rest_options=rest_options)
self.hooks = Hooks(domain, token, rest_options=rest_options)
self.jobs = Jobs(domain, token, rest_options=rest_options)
self.log_streams = LogStreams(domain, token, rest_options=rest_options)
self.logs = Logs(domain, token, rest_options=rest_options)
self.organizations = Organizations(domain, token, rest_options=rest_options)
self.prompts = Prompts(domain, token, rest_options=rest_options)
self.resource_servers = ResourceServers(
domain, token, rest_options=rest_options
)
self.roles = Roles(domain, token, rest_options=rest_options)
self.rules_configs = RulesConfigs(domain, token, rest_options=rest_options)
self.rules = Rules(domain, token, rest_options=rest_options)
self.stats = Stats(domain, token, rest_options=rest_options)
self.tenants = Tenants(domain, token, rest_options=rest_options)
self.tickets = Tickets(domain, token, rest_options=rest_options)
self.user_blocks = UserBlocks(domain, token, rest_options=rest_options)
self.users_by_email = UsersByEmail(domain, token, rest_options=rest_options)
self.users = Users(domain, token, rest_options=rest_options)

@@ -167,2 +167,28 @@ import unittest

@mock.patch("auth0.rest.RestClient.post")
def test_login_simple(self, mock_post):
g = GetToken("my.domain.com", "cid", client_secret="clsec")
g.login(
username="usrnm",
password="pswd",
)
args, kwargs = mock_post.call_args
self.assertEqual(args[0], "https://my.domain.com/oauth/token")
self.assertEqual(
kwargs["data"],
{
"client_id": "cid",
"client_secret": "clsec",
"username": "usrnm",
"password": "pswd",
"realm": None,
"scope": None,
"audience": None,
"grant_type": "http://auth0.com/oauth/grant-type/password-realm",
},
)
@mock.patch("auth0.rest.RestClient.post")
def test_refresh_token(self, mock_post):

@@ -169,0 +195,0 @@ g = GetToken("my.domain.com", "cid", client_secret="clsec")

Metadata-Version: 2.1
Name: auth0-python
Version: 4.1.0
Version: 4.1.1
Summary: Auth0 Python SDK

@@ -5,0 +5,0 @@ Home-page: https://github.com/auth0/auth0-python