lib/oauth: implementing helper.check()