/** {@inheritDoc} */ @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { for (final Map.Entry<String,Collection<IPRange>> e : mappings.entrySet()) { if (isAuthenticated(uaContext.getAddress(), e.getValue())) { principalName = e.getKey(); log.info("{} Authenticated user agent with address {} as {}", getLogPrefix(), uaContext.getAddress().getHostAddress(), principalName); recordSuccess(); buildAuthenticationResult(profileRequestContext, authenticationContext); return; } } log.debug("{} User agent with address {} was not authenticated", getLogPrefix(), uaContext.getAddress().getHostAddress()); ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_CREDENTIALS); recordFailure(); }
if (uaContext.getAddress() == null) { log.debug("{} No address available within UserAgentContext", getLogPrefix()); handleError(profileRequestContext, authenticationContext, "NoCredentials", AuthnEventIds.NO_CREDENTIALS);