Class CsrfProtection


  • public class CsrfProtection
    extends Object
    This class provides methods for checking if a request is a part of a cross-site request forgery attack (CSRF).
    • Method Detail

      • isCsrfAttack

        public boolean isCsrfAttack​(OAuth2Request request)
        Checks if the request contains the required "csrf" parameter and check it equals the users session id.
        Parameters:
        request - The request.
        Returns:
        true if the request is a CSRF attack, false if not.