Examples of ChallengeResponse


Examples of org.restlet.data.ChallengeResponse

        }

        // B - Delete the mail
        final Request request = new Request(Method.DELETE, mailRef);
        if (getMailboxChallengeScheme() != null) {
            final ChallengeResponse challengeResponse = new ChallengeResponse(
                    getMailboxChallengeScheme(), getMailboxLogin(),
                    getMailboxPassword());
            request.setChallengeResponse(challengeResponse);
        }
        final Response response = getContext().getClientDispatcher().handle(
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        final Reference mailRef = getMailRef(identifier);

        // B - Get the mail
        final Request request = new Request(Method.GET, mailRef);
        if (getMailboxChallengeScheme() != null) {
            final ChallengeResponse challengeResponse = new ChallengeResponse(
                    getMailboxChallengeScheme(), getMailboxLogin(),
                    getMailboxPassword());
            request.setChallengeResponse(challengeResponse);
        }
        final Response response = getContext().getClientDispatcher().handle(
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        final List<String> result = new ArrayList<String>();

        // 1 - Get to mailbox content
        final Request request = new Request(Method.GET, getMailboxUri());
        if (getMailboxChallengeScheme() != null) {
            final ChallengeResponse challengeResponse = new ChallengeResponse(
                    getMailboxChallengeScheme(), getMailboxLogin(),
                    getMailboxPassword());
            request.setChallengeResponse(challengeResponse);
        }
        final Response response = getContext().getClientDispatcher().handle(
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        final ChallengeScheme challengeScheme = ChallengeScheme
                .valueOf(resolver.resolve("challengeScheme"));
        final String login = resolver.resolve("login");
        final String password = resolver.resolve("password");

        ChallengeResponse result = null;
        if ((challengeScheme != null) && (login != null) && (password != null)) {
            result = new ChallengeResponse(challengeScheme, login, password);
        }

        return result;
    }
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        return ci;
    }

    @Override
    public ChallengeResponse getChallengeResponse() {
        ChallengeResponse result = super.getChallengeResponse();

        if (!this.securityAdded) {
            if (getHeaders() != null) {
                // Extract the header value
                String authorization = getHeaders().getValues(
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        return super.getPriority();
    }

    @Override
    public ChallengeResponse getProxyChallengeResponse() {
        ChallengeResponse result = super.getProxyChallengeResponse();

        if (!this.proxySecurityAdded) {
            if (getHeaders() != null) {
                // Extract the header value
                final String authorization = getHeaders().getValues(
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

    /**
     * Sends a GET request to the given subpath of the first root resource
     * class, authenticated with HTTP_BASIC with the given username and password
     */
    public Response getAuth(String subPath, String username, String password) {
        return get(subPath, new ChallengeResponse(ChallengeScheme.HTTP_BASIC,
                username, password));
    }
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

    }

    @Override
    public int verify(Request request, Response response) {
        int result = RESULT_VALID;
        ChallengeResponse cr = request.getChallengeResponse();

        if (cr == null) {
            result = RESULT_MISSING;
        } else {
            String nonce = cr.getServerNonce();
            String uri = (cr.getDigestRef() == null) ? null : cr.getDigestRef()
                    .toString();
            String qop = cr.getQuality();
            int nc = cr.getServerNounceCount();
            String cnonce = cr.getClientNonce();
            String username = getIdentifier(request, response);
            String cresponse = null;
            char[] secret = getSecret(request, response);
            if (secret != null) {
                cresponse = new String(secret);
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

        ClientCall result = null;

        try {
            Reference targetRef = request.getResourceRef().getBaseRef() == null ? request
                    .getResourceRef() : request.getResourceRef().getTargetRef();
            ChallengeResponse cr = request.getProxyChallengeResponse();

            if (cr != null) {
                if (cr.getScheme().equals(ChallengeScheme.valueOf("SDC"))) {
                    String key = cr.getIdentifier() + ":"
                            + String.valueOf(cr.getSecret());
                    int retryAttempts = 3;
                    int retryDelay = 3000;
                    SdcServerConnection ssc = null;

                    for (int i = 0; (ssc == null) && (i < retryAttempts); i++) {
View Full Code Here

Examples of org.restlet.data.ChallengeResponse

            case Verifier.RESULT_VALID:
                // Valid credentials provided
                result = true;

                if (loggable) {
                    ChallengeResponse challengeResponse = request
                            .getChallengeResponse();

                    if (challengeResponse != null) {
                        getLogger().fine(
                                "Authentication succeeded. Valid credentials provided for identifier: "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.