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 random, unique strings generated by the server and embedded in forms or AJAX requests. The getCSRFToken() method returns this token as a String, allowing it to be included in requests and validated server-side to ensure requests originate from the legitimate application, not a malicious site.