class Http {

    public static String authorizedUser(HttpServletRequest request,
            AuthorityList authorities, Authorizer authorizer, String action,
            String resource, String otherDomain) {
        Principal principal = authenticate(request, authorities);
        authorize(authorizer, principal, action, resource, otherDomain);
        return principal.getFullName();
    }

}