method authorization first version (with Java Configuration)