Examples of AuthenticationHelper


Examples of com.noelios.restlet.authentication.AuthenticationHelper

     *            Indicates if server side support is required.
     * @return The authentication helper or null.
     */
    public AuthenticationHelper findHelper(ChallengeScheme challengeScheme,
            boolean clientSide, boolean serverSide) {
        AuthenticationHelper result = null;
        final List<AuthenticationHelper> helpers = getRegisteredAuthentications();
        AuthenticationHelper current;

        for (int i = 0; (result == null) && (i < helpers.size()); i++) {
            current = helpers.get(i);

            if (current.getChallengeScheme().equals(challengeScheme)
                    && ((clientSide && current.isClientSide()) || !clientSide)
                    && ((serverSide && current.isServerSide()) || !serverSide)) {
                result = helpers.get(i);
            }
        }

        return result;
View Full Code Here

Examples of com.noelios.restlet.authentication.AuthenticationHelper

        getRegisteredAuthentications().add(new SmtpPlainHelper());
        getRegisteredAuthentications().add(new HttpAmazonS3Helper());

        // In order to support the deprecated AWS constant
        // we need to register another instance of S3 helper.
        final AuthenticationHelper helper = new HttpAmazonS3Helper();
        helper.setChallengeScheme(ChallengeScheme.HTTP_AWS);
        getRegisteredAuthentications().add(helper);
    }
View Full Code Here

Examples of com.noelios.restlet.authentication.AuthenticationHelper

     *            Indicates if server side support is required.
     * @return The authentication helper or null.
     */
    public AuthenticationHelper findHelper(ChallengeScheme challengeScheme,
            boolean clientSide, boolean serverSide) {
        AuthenticationHelper result = null;
        final List<AuthenticationHelper> helpers = getRegisteredAuthentications();
        AuthenticationHelper current;

        for (int i = 0; (result == null) && (i < helpers.size()); i++) {
            current = helpers.get(i);

            if (current.getChallengeScheme().equals(challengeScheme)
                    && ((clientSide && current.isClientSide()) || !clientSide)
                    && ((serverSide && current.isServerSide()) || !serverSide)) {
                result = helpers.get(i);
            }
        }

        return result;
View Full Code Here

Examples of com.noelios.restlet.authentication.AuthenticationHelper

        getRegisteredAuthentications().add(new SmtpPlainHelper());
        getRegisteredAuthentications().add(new HttpAmazonS3Helper());

        // In order to support the deprecated AWS constant
        // we need to register another instance of S3 helper.
        final AuthenticationHelper helper = new HttpAmazonS3Helper();
        helper.setChallengeScheme(ChallengeScheme.HTTP_AWS);
        getRegisteredAuthentications().add(helper);
    }
View Full Code Here

Examples of gov.nist.javax.sip.clientauthutils.AuthenticationHelper

                        dialog.sendRequest(ct);
                    }
                }
            } else if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED
                    || response.getStatusCode() == Response.UNAUTHORIZED) {
                AuthenticationHelper authenticationHelper =
                    ((SipStackExt) sipStack).getAuthenticationHelper(new AccountManagerImpl(), headerFactory);
               
                inviteTid = authenticationHelper.handleChallenge(response, tid, sipProvider, 5);
            
                inviteTid.sendRequest();
             
                invco++;
            }
View Full Code Here

Examples of gov.nist.javax.sip.clientauthutils.AuthenticationHelper

                Dialog dialog = tid.getDialog();
                CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                Request request = dialog.createAck(cseq.getSeqNumber());
                dialog.sendAck(request);
            } else if ( response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED)  {
               AuthenticationHelper authenticationHelper =
                     ((SipStackExt) protocolObjects.sipStack).getAuthenticationHelper(new AccountManagerImpl(),
                         protocolObjects.headerFactory);

                 tid = authenticationHelper.handleChallenge(response, (ClientTransaction) tid, provider, 5);
                 Thread.sleep(100);
                 if ( dialog.getState() == DialogState.CONFIRMED) {
                   dialog.sendRequest((ClientTransaction) tid);
                 } else {
                   ((ClientTransaction)tid).sendRequest();
View Full Code Here

Examples of gov.nist.javax.sip.clientauthutils.AuthenticationHelper

                Dialog dialog = tid.getDialog();
                CSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
                Request request = dialog.createAck(cseq.getSeqNumber());
                dialog.sendAck(request);
            } else if ( response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED)  {
               AuthenticationHelper authenticationHelper =
                     ((SipStackExt) protocolObjects.sipStack).getAuthenticationHelper(new AccountManagerImpl(),
                         protocolObjects.headerFactory);

                 tid = authenticationHelper.handleChallenge(response, (ClientTransaction) tid, provider, 5);
                 Thread.sleep(100);
                 if ( dialog.getState() == DialogState.CONFIRMED) {
                   dialog.sendRequest((ClientTransaction) tid);
                 } else {
                   ((ClientTransaction)tid).sendRequest();
View Full Code Here

Examples of gov.nist.javax.sip.clientauthutils.AuthenticationHelper

                    && ((CSeqHeader) response.getHeader(CSeqHeader.NAME))
                            .getMethod().equals(Request.BYE)) {
                this.byeOkRecieved = true;
            } else if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED ) {
             
               AuthenticationHelper authenticationHelper =
                     ((SipStackExt) protocolObjects.sipStack).getAuthenticationHelper(new AccountManagerImpl(),
                         protocolObjects.headerFactory);

                 tid = authenticationHelper.handleChallenge(response, (ClientTransaction) tid, provider, 5);

                 if ( dialog.getState() == DialogState.CONFIRMED) {
                   dialog.sendRequest((ClientTransaction) tid);
                 } else {
                   ((ClientTransaction)tid).sendRequest();
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.