class ResourceContext {

    public void authorize(String action, String resource, String trustedDomain) {
        principal = authenticate();
        Http.authorize(authorizer, principal, action, resource, trustedDomain);
    }

    public  ResourceContext(HttpServletRequest request, HttpServletResponse response,
            Http.AuthorityList authorities, Authorizer authorizer);

}