Examples of SASLFrame


Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    _user = _saslServerProvider.getAuthenticatedPrincipal(_saslServer);
                    getLock().notifyAll();
                }

                if (_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

        }
        else if (mechanisms.contains(SASL_EXTERNAL))
        {
            init.setMechanism(SASL_EXTERNAL);
        }
        _saslFrameOutput.send(new SASLFrame(init), null);
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    _user = _saslServerProvider.getAuthenticatedPrincipal(_saslServer);
                    getLock().notifyAll();
                }
                if (_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

        for (String name : mechanismNames)
        {
            mechanismsList.add(Symbol.valueOf(name));
        }
        mechanisms.setSaslServerMechanisms(mechanismsList.toArray(new Symbol[mechanismsList.size()]));
        _saslFrameOutput.send(new SASLFrame(mechanisms), null);
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    getLock().notifyAll();
                }

                if(_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            byte[] passwordBytes = _password.getBytes(Charset.forName("UTF-8"));
            byte[] initResponse = new byte[usernameBytes.length+passwordBytes.length+2];
            System.arraycopy(usernameBytes,0,initResponse,1,usernameBytes.length);
            System.arraycopy(passwordBytes,0,initResponse,usernameBytes.length+2,passwordBytes.length);
            init.setInitialResponse(new Binary(initResponse));
            _saslFrameOutput.send(new SASLFrame(init),null);
        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

                    if (_saslServer.isComplete())
                    {
                        SaslOutcome outcome = new SaslOutcome();

                        outcome.setCode(SaslCode.OK);
                        _saslFrameOutput.send(new SASLFrame(outcome),null);
                        synchronized (getLock())
                        {
                            _saslComplete = true;
                            _authenticated = true;
                            getLock().notifyAll();
                        }
                        if(_onSaslCompleteTask != null)
                        {
                            _onSaslCompleteTask.run();
                        }

                    }
                    else
                    {
                        SaslChallenge challengeBody = new SaslChallenge();
                        challengeBody.setChallenge(new Binary(challenge));
                        _saslFrameOutput.send(new SASLFrame(challengeBody), null);

                    }
                }
                catch (SaslException e)
                {
                    SaslOutcome outcome = new SaslOutcome();

                    outcome.setCode(SaslCode.AUTH);
                    _saslFrameOutput.send(new SASLFrame(outcome),null);
                    synchronized (getLock())
                    {
                        _saslComplete = true;
                        _authenticated = false;
                        getLock().notifyAll();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

                mechanismsList.add(Symbol.valueOf(name));
            }

        }
        mechanisms.setSaslServerMechanisms(mechanismsList.toArray(new Symbol[mechanismsList.size()]));
        _saslFrameOutput.send(new SASLFrame(mechanisms), null);
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    getLock().notifyAll();
                }

                if(_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.framing.SASLFrame

            byte[] passwordBytes = _password.getBytes(Charset.forName("UTF-8"));
            byte[] initResponse = new byte[usernameBytes.length+passwordBytes.length+2];
            System.arraycopy(usernameBytes,0,initResponse,1,usernameBytes.length);
            System.arraycopy(passwordBytes,0,initResponse,usernameBytes.length+2,passwordBytes.length);
            init.setInitialResponse(new Binary(initResponse));
            _saslFrameOutput.send(new SASLFrame(init),null);
        }
    }
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.