code: protected void beforeInvoke(Method method, Object[] params) throws Exception {
          Config config = configBean.getConfig();
  
          // Create session for proxies
          session = createSession();
          session.setAutoCommit(true);
  
          // Instantiate proxies and inject them
          for (Field field : getClass().getDeclaredFields()) {
              if (field.getAnnotation(InjectStoredProcedureProxy.class) != null) {
                  try {
                      Object proxy = createProxy(field.getType(), session);
                      field.setAccessible(true);
                      field.set(this, proxy);
                  } catch (Exception ex) {
                      throw new InjectStoredProcedureProxyException(ex, field.getType());
                  }
              }
          }
  
          // Extract security token and current user principal
          currentSecurityToken = null;
          currentUserPrincipal = null;
          if (httpServletRequest != null) {
              for (Cookie cookie : httpServletRequest.getCookies()) {
                  if (cookie.getName().equals(configBean.getConfig().getSecurityCookieName())) {
                      currentSecurityToken = cookie.getValue();
                      currentUserPrincipal = config.getSecurityTokenStorage().get(currentSecurityToken);
                  }
              }
  
              if (currentUserPrincipal == null && method.getAnnotation(SkipSecurityCheck.class) == null) {
                  throw new APIException(401);
              }
          }
      }
docs: Called by interceptor before bean method has been invoked.
  <p/>
  It's important to call base method in override-method, because base method is responsible for
  cookie authentication, SQL session creation and injection of stored procedure proxies.
  
  @param method Method, which is about to be invoked.
  @param params Method params.
  @throws Exception