# OAuth2 Token Endpoint URL Detector
# Captures the token endpoint URL for refresh requests
# Example: {"token_endpoint": "https://oauth2.googleapis.com/token", ...}
#
# This endpoint is used to refresh expired access tokens
# Critical for implementing automatic token refresh
#
# Created: December 2024
# Author: Web Performance Inc

detector.name=OAuth2 Token Endpoint URL

# Capture token endpoint URL from various possible field names
# Common in OAuth2 discovery documents and initial responses
search.pattern="(?:token_endpoint|token_uri|tokenEndpoint)"\\s*:\\s*"([^"]+)"

# JSON responses
content_type.pattern=(?i).*json.*|.*javascript.*|.*html.*

groups.count=1
group1.sticky=true

# Special family for OAuth2 endpoints
equivalency.name.family=OAuth2-Endpoints

unescape.source=Only Javascript
detector=sread

# Platform detection metadata
platform=oauth2
detection.hint=JSON with "access_token", "refresh_token", "token_type", or "Bearer" authorization
