@Override public Object authenticate(Resource resource, Request request) { log.debug("authenticate"); Auth auth = request.getAuthorization(); Object o = securityManager.authenticate(auth.getUser(), auth.getPassword()); log.debug("result: " + o); return o; }
@Override public boolean supports(Resource r, Request request) { Auth auth = request.getAuthorization(); if (auth == null) { return false; } if (log.isTraceEnabled()) { log.trace("supports basic? requested scheme: " + auth.getScheme()); } return auth.getScheme().equals(Scheme.BASIC); }
@Override public boolean authorise(Request request, Request.Method method, Auth auth) { // freebusy query's will be POST'd to the invited user's outbox, so we need // them to be authorised if (method.equals(Method.POST)) { return auth != null && auth.getTag() != null; } else { return principal.authorise(request, method, auth); } }