code: func WithTokenCheck(c *router.Context, next router.Handler) {
  	tok := c.Request.PostFormValue("xsrf_token")
  	if tok == "" {
  		replyError(c.Context, c.Writer, http.StatusForbidden, "XSRF token is missing")
  		return
  	}
  	switch err := Check(c.Context, tok); {
  	case transient.Tag.In(err):
  		replyError(c.Context, c.Writer, http.StatusInternalServerError, "Transient error when checking XSRF token - %s", err)
  	case err != nil:
  		replyError(c.Context, c.Writer, http.StatusForbidden, "Bad XSRF token - %s", err)
  	default:
  		next(c)
  	}
  }
docs: // WithTokenCheck is middleware that checks validity of XSRF tokens.
  //
  // If searches for the token in "xsrf_token" POST form field (as generated by
  // TokenField). Aborts the request with HTTP 403 if XSRF token is missing or
  // invalid.