What is the return type of the getCSRFToken() method?
-
Integer
-
Byte
-
String
-
BigInteger
Reveal answer
Fill a bubble to check yourself
C
Correct answer
Explanation
CSRF tokens are typically generated as random strings that can be embedded in forms or HTTP headers. The getCSRFToken() method returns a String token value, not numeric types like Integer or BigInteger, which would be unsuitable for token representation.
AI explanation
getCSRFToken() in ESAPI's HTTPUtilities returns a String — the token itself is a random string value bound to the user's session that gets embedded in forms/links and validated on submission. It isn't returned as a numeric type since the token is meant to be an unguessable opaque string, not a value used in arithmetic.