Code example for AuthState

Methods: getAuthSchemesetAuthScheme

            final AuthenticationHandler authHandler,
            final HttpResponse response, 
            final HttpContext context) 
                throws MalformedChallengeException, AuthenticationException { 
        AuthScheme authScheme = authState.getAuthScheme();
        if (authScheme == null) {
            // Authentication not attempted before 
            authScheme = authHandler.selectScheme(challenges, response, context);
        String id = authScheme.getSchemeName();
        Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH));
        if (challenge == null) {
            throw new AuthenticationException(id + 
                " authorization challenge expected, but not found"); 
        this.log.debug("Authorization challenge processed");
Connect your IDE to all the code out there  Get Codota for Java