replace authorize() with isAuthorized()