Repository Analysis

django-oauth/django-oauth-toolkit

OAuth2 goodies for the Djangonauts!

14.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of django-oauth/django-oauth-toolkit, a Python project with 3,330 GitHub stars. SynthScan v2.0 examined 83,172 lines of code across 247 source files, recording 956 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 14.0 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

14.0
Adjusted Score
14.0
Raw Score
100%
Time Factor
2026-07-09
Last Push
3.3K
Stars
Python
Language
83.2K
Lines of Code
247
Files
956
Pattern Hits
2026-07-14
Scan Date
0.11
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 8HIGH 19MEDIUM 34LOW 895

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 956 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers733 hits · 692 pts
SeverityFileLineSnippetContext
LOWtests/test_www_authenticate.py24 def test_bare_bearer_when_nothing_to_advertise(self):CODE
LOWtests/test_www_authenticate.py28 def test_includes_error_and_resource_metadata(self):CODE
LOWtests/test_www_authenticate.py42 def test_explicit_resource_metadata_url_overrides_default(self):CODE
LOWtests/test_www_authenticate.py50 def test_explicit_none_omits_resource_metadata(self):CODE
LOWtests/test_www_authenticate.py55 def test_quoted_string_values_are_escaped(self):CODE
LOWtests/test_oauth2_provider_middleware.py32 def test_malformed_bearer_header_no_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py42 def test_malformed_bearer_header_empty_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py74 def test_invalid_bearer_token(self):CODE
LOWtests/test_oauth2_provider_middleware.py84 def test_no_authorization_header(self):CODE
LOWtests/test_oauth2_provider_middleware.py93 def test_non_bearer_authorization_header(self):CODE
LOWtests/test_oauth2_provider_middleware.py113 def test_case_insensitive_bearer_scheme(self):CODE
LOWtests/test_oauth2_provider_middleware.py126 def test_scheme_starting_with_bearer_is_rejected(self):CODE
LOWtests/test_oauth2_provider_middleware.py136 def test_whitespace_variations(self):CODE
LOWtests/test_admin.py37def test_mask_credential_hides_the_secret():CODE
LOWtests/test_admin.py56def _assert_hidden_on_change_form(admin_class, model, field, masked_field):CODE
LOWtests/test_admin.py70def test_credential_admins_disable_add():CODE
LOWtests/test_admin.py83def test_admin_overrides_preserve_subclass_config():CODE
LOWtests/test_admin.py104def _assert_searchable_by_app_and_user(admin_class):CODE
LOWtests/test_admin.py112def test_access_token_admin_does_not_expose_token():CODE
LOWtests/test_admin.py119def test_refresh_token_admin_does_not_expose_token():CODE
LOWtests/test_admin.py126def test_grant_admin_does_not_expose_code():CODE
LOWtests/test_admin.py133def test_id_token_admin_searchable_by_app_and_user():CODE
LOWtests/test_oauth2_validators.py136 def test_authenticate_basic_auth_hashed_secret(self):CODE
LOWtests/test_oauth2_validators.py141 def test_authenticate_basic_auth_unhashed_secret(self):CODE
LOWtests/test_oauth2_validators.py150 def test_authenticate_basic_auth_default_encoding(self):CODE
LOWtests/test_oauth2_validators.py155 def test_authenticate_basic_auth_wrong_client_id(self):CODE
LOWtests/test_oauth2_validators.py160 def test_authenticate_basic_auth_wrong_client_secret(self):CODE
LOWtests/test_oauth2_validators.py165 def test_authenticate_basic_auth_wrong_client_secret_not_logged(self):CODE
LOWtests/test_oauth2_validators.py173 def test_authenticate_request_body_wrong_client_secret_not_logged(self):CODE
LOWtests/test_oauth2_validators.py181 def test_authenticate_basic_auth_undecodable_credentials_not_logged(self):CODE
LOWtests/test_oauth2_validators.py223 def test_authenticate_basic_auth_public_app_with_device_code(self):CODE
LOWtests/test_oauth2_validators.py229 def test_authenticate_check_secret(self):CODE
LOWtests/test_oauth2_validators.py236 def test_authenticate_client_id(self):CODE
LOWtests/test_oauth2_validators.py239 def test_authenticate_client_id_fail(self):CODE
LOWtests/test_oauth2_validators.py245 def test_client_authentication_required(self):CODE
LOWtests/test_oauth2_validators.py259 def test_load_application_loads_client_id_when_request_has_no_client(self):CODE
LOWtests/test_oauth2_validators.py264 def test_load_application_uses_cached_when_request_has_valid_client_matching_client_id(self):CODE
LOWtests/test_oauth2_validators.py270 def test_load_application_succeeds_when_request_has_invalid_client_valid_client_id(self):CODE
LOWtests/test_oauth2_validators.py276 def test_load_application_overwrites_client_on_client_id_mismatch(self):CODE
LOWtests/test_oauth2_validators.py291 def test_load_application_returns_none_when_client_not_usable_cached(self, mock_is_usable):CODE
LOWtests/test_oauth2_validators.py299 def test_load_application_returns_none_when_client_not_usable_db_lookup(self, mock_is_usable):CODE
LOWtests/test_oauth2_validators.py306 def test_rotate_refresh_token__is_true(self):CODE
LOWtests/test_oauth2_validators.py309 def test_validate_refresh_token_with_long_token(self):CODE
LOWtests/test_oauth2_validators.py734def test_validate_id_token_expired_jwt(oauth2_settings, mocker, oidc_tokens):CODE
LOWtests/test_oauth2_validators.py742def test_validate_id_token_no_token(oauth2_settings, mocker):CODE
LOWtests/test_oauth2_validators.py750def test_validate_id_token_app_removed(oauth2_settings, mocker, oidc_tokens):CODE
LOWtests/test_oauth2_validators.py759def test_validate_id_token_bad_token_no_aud(oauth2_settings, mocker, oidc_key):CODE
LOWtests/test_oauth2_validators.py768def test_get_id_token_dictionary_auth_time_naive_last_login_is_utc(oauth2_settings, rf):CODE
LOWtests/test_oauth2_validators.py90 def test_authenticate_request_body(self):CODE
LOWtests/test_oauth2_validators.py112 def test_authenticate_request_body_unhashed_secret(self):CODE
LOWtests/test_oauth2_validators.py329 def test_validate_refresh_token_with_unknown_token(self):CODE
LOWtests/test_oauth2_validators.py333 def test_revoke_token_with_long_refresh_token(self):CODE
LOWtests/test_oauth2_validators.py346 def test_validate_refresh_token_prefers_unrevoked_row_over_revoked_duplicate(self):CODE
LOWtests/test_oauth2_validators.py366 def test_revoke_token_with_duplicate_refresh_token_checksums(self):CODE
LOWtests/test_oauth2_validators.py385 def test_save_bearer_token__without_user__raises_fatal_client(self):CODE
LOWtests/test_oauth2_validators.py391 def test_save_bearer_token__with_existing_tokens__does_not_create_new_tokens(self):CODE
LOWtests/test_oauth2_validators.py420 def test_save_bearer_token__checks_to_rotate_tokens(self):CODE
LOWtests/test_oauth2_validators.py444 def test_save_bearer_token__with_new_token__creates_new_tokens(self):CODE
LOWtests/test_oauth2_validators.py459 def test_save_bearer_token__with_new_token_equal_to_existing_token__revokes_old_tokens(self):CODE
LOWtests/test_oauth2_validators.py486 def test_save_bearer_token__with_no_refresh_token__creates_new_access_token_only(self):CODE
673 more matches not shown…
Decorative Section Separators28 hits · 99 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_device.py256 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py258 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py268 # -------------------------COMMENT
MEDIUMtests/test_device.py270 # -------------------------COMMENT
MEDIUMtests/test_device.py139 # -----------------------COMMENT
MEDIUMtests/test_device.py142 # -----------------------COMMENT
MEDIUMtests/test_device.py197 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py200 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py242 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_device.py245 # --------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py344# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py346# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py443# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py445# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py777# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py779# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py22# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py24# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py48# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py369# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py372# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py872# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py874# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py898# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_dcr_views.py900# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/e2e/conftest.py101# --------------------------------------------------------------------------COMMENT
MEDIUMtests/e2e/conftest.py103# --------------------------------------------------------------------------COMMENT
Hallucination Indicators8 hits · 95 pts
SeverityFileLineSnippetContext
CRITICALtests/test_dcr_views.py337 from django.core.exceptions import ValidationErrorCODE
CRITICALtests/test_resource_validators.py436 from django.core.exceptions import ValidationErrorCODE
CRITICALtests/test_resource_validators.py442 from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/models.py244 from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/validators.py4from django.core.exceptions import ValidationErrorCODE
CRITICAL…uth2_provider/management/commands/createapplication.py1from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/views/device.py5from django.core.exceptions import ValidationErrorCODE
CRITICALoauth2_provider/views/dynamic_client_registration.py13from django.core.exceptions import ValidationErrorCODE
Cross-File Repetition18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHtests/test_implicit.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_hybrid.py0test for default redirect uri if omitted from query string with response_type: codeSTRING
HIGHtests/test_implicit.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_hybrid.py0test error when passing a forbidden redirect_uri in query string with response_type: codeSTRING
HIGHtests/test_implicit.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_authorization_code.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_hybrid.py0test authorization code is given for an allowed request with response_type: codeSTRING
HIGHtests/test_implicit.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_authorization_code.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_hybrid.py0if application.skip_authorization = true, should skip the authorization page.STRING
HIGHtests/test_implicit.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_authorization_code.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_hybrid.py0tests that a redirection uri with query string is allowed and query string is retained on redirection. see https://rfc-eSTRING
HIGHtests/test_implicit.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
HIGHtests/test_authorization_code.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
HIGHtests/test_hybrid.py0tests that a redirection uri is matched using scheme + netloc + pathSTRING
Unused Imports53 hits · 47 pts
SeverityFileLineSnippetContext
LOWtests/mysql_settings.py5CODE
LOWtests/settings_swapped.py1CODE
LOWtests/multi_db_settings.py3CODE
LOWtests/mysql_pr_settings.py5CODE
LOWtests/postgres_mig_settings.py3CODE
LOWtests/multi_db_settings_invalid_token_configuration.py1CODE
LOWtests/mysql_pr_mig_settings.py5CODE
LOWtests/postgres_pr_settings.py3CODE
LOWtests/postgres_settings.py3CODE
LOWtests/mysql_mig_settings.py5CODE
LOWtests/postgres_pr_mig_settings.py3CODE
LOWoauth2_provider/compat.py8CODE
LOWoauth2_provider/apps.py10CODE
LOWoauth2_provider/contrib/ninja/__init__.py1CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py2CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py2CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/contrib/rest_framework/__init__.py3CODE
LOWoauth2_provider/views/__init__.py2CODE
LOWoauth2_provider/views/__init__.py2CODE
LOWoauth2_provider/views/__init__.py2CODE
LOWoauth2_provider/views/__init__.py3CODE
LOWoauth2_provider/views/__init__.py3CODE
LOWoauth2_provider/views/__init__.py3CODE
LOWoauth2_provider/views/__init__.py3CODE
LOWoauth2_provider/views/__init__.py3CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py10CODE
LOWoauth2_provider/views/__init__.py21CODE
LOWoauth2_provider/views/__init__.py22CODE
LOWoauth2_provider/views/__init__.py22CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py23CODE
LOWoauth2_provider/views/__init__.py24CODE
LOWoauth2_provider/views/__init__.py24CODE
LOWoauth2_provider/views/__init__.py25CODE
LOWoauth2_provider/views/__init__.py25CODE
LOWoauth2_provider/views/__init__.py25CODE
LOWoauth2_provider/views/__init__.py25CODE
LOWoauth2_provider/views/__init__.py26CODE
LOWoauth2_provider/views/__init__.py26CODE
Verbosity Indicators27 hits · 29 pts
SeverityFileLineSnippetContext
LOWtests/test_rfc8707_integration.py96 # Step 3: Verify access token has resource binding (JSON array format)COMMENT
LOWtests/test_rfc8707_integration.py101 # Step 4: Verify audience validationCOMMENT
LOWtests/test_rfc8707_integration.py45 # Step 1: Authorization request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py78 # Step 2: Token request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py396 # Step 1: Authorization request with limited resourcesCOMMENT
LOWtests/test_rfc8707_integration.py411 # Step 2: Token request trying to escalate to unauthorized resourceCOMMENT
LOWtests/test_rfc8707_integration.py462 # Step 1: Authorization with multiple resourcesCOMMENT
LOWtests/test_rfc8707_integration.py479 # Step 2: Token request WITHOUT resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py534 # Step 1: Authorization with three resourcesCOMMENT
LOWtests/test_rfc8707_integration.py553 # Step 2: Token request repeating the resource parameter to narrow to twoCOMMENT
LOWtests/test_rfc8707_integration.py606 # Step 1: Authorization with a single resourceCOMMENT
LOWtests/test_rfc8707_integration.py620 # Step 2: Token request repeating resource params, one outside the grantCOMMENT
LOWtests/test_rfc8707_integration.py670 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py685 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py712 # Step 3: Use refresh token to get new access tokenCOMMENT
LOWtests/test_rfc8707_integration.py726 # Step 4: Verify new access token preserves resource from refresh tokenCOMMENT
LOWtests/test_rfc8707_integration.py762 # Step 1: Authorization with specific resourcesCOMMENT
LOWtests/test_rfc8707_integration.py782 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py805 # Step 3: Attempt refresh with unauthorized resource - should failCOMMENT
LOWtests/test_rfc8707_integration.py822 # Step 4: Get fresh token to test narrowing (previous refresh may have consumed token)COMMENT
LOWtests/test_rfc8707_integration.py840 # Step 5: Refresh with subset (resource1 only) - should succeedCOMMENT
LOWtests/test_rfc8707_integration.py888 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py903 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py924 # Step 3: Use refresh token (should rotate and create new refresh token)COMMENT
LOWtests/test_rfc8707_integration.py977 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py991 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py1008 # Step 3: Refresh (non-rotating — same refresh token reused, access token updated in place)COMMENT
Structural Annotation Overuse27 hits · 29 pts
SeverityFileLineSnippetContext
LOWtests/test_rfc8707_integration.py96 # Step 3: Verify access token has resource binding (JSON array format)COMMENT
LOWtests/test_rfc8707_integration.py101 # Step 4: Verify audience validationCOMMENT
LOWtests/test_rfc8707_integration.py45 # Step 1: Authorization request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py78 # Step 2: Token request with resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py396 # Step 1: Authorization request with limited resourcesCOMMENT
LOWtests/test_rfc8707_integration.py411 # Step 2: Token request trying to escalate to unauthorized resourceCOMMENT
LOWtests/test_rfc8707_integration.py462 # Step 1: Authorization with multiple resourcesCOMMENT
LOWtests/test_rfc8707_integration.py479 # Step 2: Token request WITHOUT resource parameterCOMMENT
LOWtests/test_rfc8707_integration.py534 # Step 1: Authorization with three resourcesCOMMENT
LOWtests/test_rfc8707_integration.py553 # Step 2: Token request repeating the resource parameter to narrow to twoCOMMENT
LOWtests/test_rfc8707_integration.py606 # Step 1: Authorization with a single resourceCOMMENT
LOWtests/test_rfc8707_integration.py620 # Step 2: Token request repeating resource params, one outside the grantCOMMENT
LOWtests/test_rfc8707_integration.py670 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py685 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py712 # Step 3: Use refresh token to get new access tokenCOMMENT
LOWtests/test_rfc8707_integration.py726 # Step 4: Verify new access token preserves resource from refresh tokenCOMMENT
LOWtests/test_rfc8707_integration.py762 # Step 1: Authorization with specific resourcesCOMMENT
LOWtests/test_rfc8707_integration.py782 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py805 # Step 3: Attempt refresh with unauthorized resource - should failCOMMENT
LOWtests/test_rfc8707_integration.py822 # Step 4: Get fresh token to test narrowing (previous refresh may have consumed token)COMMENT
LOWtests/test_rfc8707_integration.py840 # Step 5: Refresh with subset (resource1 only) - should succeedCOMMENT
LOWtests/test_rfc8707_integration.py888 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py903 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py924 # Step 3: Use refresh token (should rotate and create new refresh token)COMMENT
LOWtests/test_rfc8707_integration.py977 # Step 1: Authorization with resourceCOMMENT
LOWtests/test_rfc8707_integration.py991 # Step 2: Exchange code for tokensCOMMENT
LOWtests/test_rfc8707_integration.py1008 # Step 3: Refresh (non-rotating — same refresh token reused, access token updated in place)COMMENT
Fake / Example Data15 hits · 17 pts
SeverityFileLineSnippetContext
LOWtests/test_application_views.py434 cls.admin_user = UserModel.objects.create_superuser("admin_user", "admin@example.com", "123456")CODE
LOWtests/test_rest_framework.py187 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_rest_framework.py207 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_rest_framework.py236 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_rest_framework.py259 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_rest_framework.py272 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_rest_framework.py463 auth = self._create_authorization_header("fake-token")CODE
LOWtests/test_settings.py233 admin_user = UserModel.objects.create_superuser("admin", "admin@example.com", "password")CODE
LOWrfcs/openid-connect-core-1_0.txt3371 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3796 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3936 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt3998 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-core-1_0.txt7742 "name": "Jane Doe",CODE
LOWrfcs/openid-connect-discovery-1_0.txt650 Such an example is "acct:joe%40example.com@example.org". End-UsersCODE
LOWrfcs/openid-connect-discovery-1_0.txt651 MAY input values like "joe@example.com@example.org" to initiateCODE
Over-Commented Block13 hits · 13 pts
SeverityFileLineSnippetContext
LOWpyproject.toml101COMMENT
LOWtox.ini1[tox]COMMENT
LOWdocker-compose.yml21 condition: service_completed_successfullyCOMMENT
LOWdocs/conf.py1# Django OAuth Toolkit documentation build configuration file, created byCOMMENT
LOWdocs/conf.py81# There are two options for replacing |today|: either, you set today to someCOMMENT
LOWdocs/conf.py121COMMENT
LOWdocs/conf.py141# A shorter title for the navigation bar. Default is the same as html_title.COMMENT
LOWdocs/conf.py161COMMENT
LOWdocs/conf.py181COMMENT
LOWdocs/conf.py221# the title page.COMMENT
LOWoauth2_provider/models.py1061 continueCOMMENT
LOW…provider/static/oauth2_provider/js/application_form.js1// Live client-secret UX for the Application form.COMMENT
LOWoauth2_provider/views/base.py421 the login flow with the prompt consumed, so the user is not sent toCOMMENT
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_oauth2_provider_middleware.py54 # Create a valid access tokenCOMMENT
MEDIUMtests/test_application_views.py35 # Create a registration view and tests that the model form is boundCOMMENT
MEDIUMtests/test_dcr_views.py615 # Create a second application with its own tokenCOMMENT
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to its containing dir.COMMENT
Deep Nesting11 hits · 11 pts
SeverityFileLineSnippetContext
LOWtests/e2e/conftest.py70CODE
LOWtests/e2e/compliance.py110CODE
LOWoauth2_provider/oauth2_validators.py239CODE
LOWoauth2_provider/oauth2_validators.py322CODE
LOWoauth2_provider/oauth2_validators.py671CODE
LOWoauth2_provider/oauth2_validators.py771CODE
LOWoauth2_provider/oauth2_validators.py855CODE
LOWoauth2_provider/settings.py273CODE
LOWoauth2_provider/contrib/rest_framework/permissions.py146CODE
LOWoauth2_provider/views/base.py179CODE
LOWoauth2_provider/views/base.py513CODE
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/multi_db_settings.py15 # Keep ``default`` concrete so Django's test harness can use standard multi-dbCOMMENT
LOWtests/test_device.py1040 # values take effect without wiping the overrides we just set above.COMMENT
MEDIUMtests/app/idp/idp/settings.py269 # log oauth2_provider issues to facilitate troubleshootingCOMMENT
LOWtests/app/idp/idp/oauth.py9# the way we're using it, so we just use a lambda that returns NoneCOMMENT
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWoauth2_provider/settings.py277 # Check if present in user settingsCOMMENT
LOWoauth2_provider/decorators.py121 # Check if provided scopes are acceptableCOMMENT
LOWoauth2_provider/decorators.py131 # Check if method is safe. Build a fresh list per request so the read/writeCOMMENT
Excessive Try-Catch Wrapping4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/e2e/browser_rp/conftest.py59 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_rp/conftest.py81 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/browser_rp/conftest.py94 except Exception as exc: # pragma: no cover - environment guardCODE
LOWtests/e2e/helpers/browser.py27 except Exception as exc: # Playwright TimeoutError (or the check's own AssertionError)CODE
Modern Structural Boilerplate4 hits · 4 pts
SeverityFileLineSnippetContext
LOWoauth2_provider/compat.py15__all__ = ["login_not_required"]CODE
LOWoauth2_provider/models.py31logger = logging.getLogger(__name__)CODE
LOWoauth2_provider/utils.py107def set_oauthlib_user_to_device_request_user(request: Request) -> None:CODE
LOWoauth2_provider/contrib/ninja/__init__.py4__all__ = ["HttpOAuth2"]CODE
Cross-Language Confusion1 hit · 4 pts
SeverityFileLineSnippetContext
HIGHtests/test_oidc_views.py170 """Required OIDC endpoints must fail fast, not emit null, when unreversible."""STRING
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/e2e/helpers/oauth_client.py147CODE
LOWtests/e2e/helpers/idp_process.py53CODE
LOWoauth2_provider/middleware.py65CODE