@Override public AuthenticationContext build(final Service service) { final Authentication authentication = buildAuthentication(); if (authentication == null) { LOGGER.info("Authentication context cannot be produced because no authentication is recorded into in the chain. Returning " + "null"); return null; } LOGGER.debug("Building an authentication context for authentication {} and service {}", authentication, service); final DefaultAuthenticationContext ctx = new DefaultAuthenticationContext(authentication, service); ctx.setCredentialProvided(this.providedCredential != null); return ctx; }