Multiple choice technology security

What is the return type of the getCSRFToken() method?

  1. Integer

  2. Byte

  3. String

  4. BigInteger

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

CSRF tokens are typically generated as random strings that are included in forms or requests and validated on the server. String is the standard return type for token generation methods because tokens need to be transportable in HTTP headers, form fields, or URLs. Numeric types would not serve this purpose.