Package org.restlet.data

Examples of org.restlet.data.ChallengeScheme


    // this makes restlet code tied to Servlet code, and we what is happening here is VERY dirty!
    HttpServletRequest servletRequest = ((ServletCall) ((HttpRequest) req).getHttpCall()).getRequest();

    String scheme = (String) servletRequest.getAttribute(NexusHttpAuthenticationFilter.AUTH_SCHEME_KEY);

    ChallengeScheme challengeScheme = null;

    if (NexusHttpAuthenticationFilter.FAKE_AUTH_SCHEME.equals(scheme)) {
      challengeScheme = new ChallengeScheme("HTTP_NXBASIC", "NxBasic", "Fake basic HTTP authentication");
    }
    else {
      challengeScheme = ChallengeScheme.HTTP_BASIC;
    }
View Full Code Here


                String scheme = header.substring(0, space);
                String realm = header.substring(space + 1);
                int equals = realm.indexOf('=');
                String realmValue = realm.substring(equals + 2,
                        realm.length() - 1);
                result = new ChallengeRequest(new ChallengeScheme("HTTP_"
                        + scheme, scheme), realmValue);
            }
        }

        return result;
View Full Code Here

            int space = header.indexOf(' ');

            if (space != -1) {
                String scheme = header.substring(0, space);
                String credentials = header.substring(space + 1);
                result = new ChallengeResponse(new ChallengeScheme("HTTP_"
                        + scheme, scheme), credentials);

                if (result.getScheme().equals(ChallengeScheme.HTTP_BASIC)) {
                    try {
                        byte[] credentialsEncoded = Base64.decode(result
View Full Code Here

                String scheme = header.substring(0, space);
                String realm = header.substring(space + 1);
                int equals = realm.indexOf('=');
                String realmValue = realm.substring(equals + 2,
                        realm.length() - 1);
                result = new ChallengeRequest(new ChallengeScheme("HTTP_"
                        + scheme, scheme), realmValue);
            }
        }

        return result;
View Full Code Here

            int space = header.indexOf(' ');

            if (space != -1) {
                String scheme = header.substring(0, space);
                String credentials = header.substring(space + 1);
                result = new ChallengeResponse(new ChallengeScheme("HTTP_"
                        + scheme, scheme), credentials);

                if (result.getScheme().equals(ChallengeScheme.HTTP_BASIC)) {
                    try {
                        byte[] credentialsEncoded = Base64.decode(result
View Full Code Here

        if (header != null) {
            final int space = header.indexOf(' ');

            if (space != -1) {
                final String scheme = header.substring(0, space);
                result = new ChallengeRequest(new ChallengeScheme("HTTP_"
                        + scheme, scheme), null);

                // Parse the parameters to extract the realm
                final String rest = header.substring(space + 1);
                parseParameters(rest, result.getParameters());
                result.setRealm(result.getParameters().getFirstValue("realm"));
            } else {
                final String scheme = header.substring(0);
                result = new ChallengeRequest(new ChallengeScheme("HTTP_"
                        + scheme, scheme), null);
            }
        }

        // Give a chance to the authentication helper to do further parsing
View Full Code Here

            final int space = header.indexOf(' ');

            if (space != -1) {
                final String scheme = header.substring(0, space);
                final String credentials = header.substring(space + 1);
                result = new ChallengeResponse(new ChallengeScheme("HTTP_"
                        + scheme, scheme), credentials);

                // Give a chance to the authentication helper to do further
                // parsing
                final AuthenticationHelper helper = Engine.getInstance()
View Full Code Here

TOP

Related Classes of org.restlet.data.ChallengeScheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.