Xirsys.XTurn.Actions.Authenticates (xturn v2.0.0)

Copy Markdown View Source

Shared pipeline gate for STUN/TURN methods that require credentials.

What problem this solves

TURN must verify that the client holds valid credentials before creating or using an allocation. This action checks nonce freshness, username/password (or access token), password algorithms, and MESSAGE-INTEGRITY on each protected request.

Runs before Allocate, Refresh, ChannelBind, CreatePerm, Connect, and ConnectionBind in their respective pipeline chains.

Internal

Pipeline action only; not part of the public application API.

RFCs

  • RFC 8489 - STUN (long-term credentials, MESSAGE-INTEGRITY-SHA256)
  • RFC 5389 - STUN (MESSAGE-INTEGRITY, nonce)
  • RFC 7635 - STUN extension for OAuth (access token path)

Summary

Functions

Validates nonce, credentials, and message integrity for the current request.

Functions

process(conn)

Validates nonce, credentials, and message integrity for the current request.

Passes conn through unchanged when auth is disabled or not required; on success updates decoded_message with verified attrs and key; on failure sets an error response (400, 401, 438, 437, or 441).