public boolean isValidSecretToken ( HttpServletRequest request ) { if ( this . secretToken != null ) { String secretToken = request . getHeader ( "X-Gitlab-Token" ) ; return ( isValidSecretToken ( secretToken ) ) ; } return ( true ) ; }
Validate the provided secret token found in the HTTP header against the reference secret token . Returns true if the secret token is valid or there is no reference secret token to validate against otherwise returns false .