# OAuth2 Refresh Grant Type Detector
# Detects and parameterizes the grant_type field for refresh token requests
# The refresh flow requires: grant_type=refresh_token
#
# This helps ASM understand when a request is for token refresh
#
# Created: December 2024
# Author: Web Performance Inc

detector.name=OAuth2 Grant Type (Refresh)

# Match grant_type in form data or JSON
# Looking specifically for refresh_token grant type
search.pattern=(?:grant_type=refresh_token|"grant_type"\\s*:\\s*"refresh_token")

# Match both form-encoded and JSON requests
content_type.pattern=(?i).*form.*|.*json.*|.*html.*

groups.count=0

# This is more of a detection pattern than extraction
# It helps identify refresh token requests
equivalency.name.family=OAuth2-GrantType

detector=sread

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