code: public static Authentication getCurrentAuthentication() {
          RequestContext context = RequestContext.getCurrent();
          if (context != null) {
              return getAuthentication(context.getRequest());
          } else {
              return null;
          }
      }
docs: Returns the authentication attribute from the current request.
  
  @return the authentication object