Package org.apache.qpid.server.security.auth

Examples of org.apache.qpid.server.security.auth.AuthenticationManager


                               ExchangeRegistry exchangeRegistry, AMQProtocolSession protocolSession,
                               AMQMethodEvent<ConnectionSecureOkBody> evt) throws AMQException
    {
        ConnectionSecureOkBody body = evt.getMethod();

        AuthenticationManager authMgr = ApplicationRegistry.getInstance().getAuthenticationManager();
        SaslServer ss = protocolSession.getSaslServer();
        if (ss == null)
        {
            throw new AMQException("No SASL context set up in session");
        }

        AuthenticationResult authResult = authMgr.authenticate(ss, body.response);
        switch (authResult.status)
        {
            case ERROR:
                // Can't do this as we violate protocol. Need to send Close
                // throw new AMQException(AMQConstant.NOT_ALLOWED.getCode(), AMQConstant.NOT_ALLOWED.getName());
View Full Code Here


    {
        final ConnectionStartOkBody body = evt.getMethod();
        _logger.info("SASL Mechanism selected: " + body.mechanism);
        _logger.info("Locale selected: " + body.locale);

        AuthenticationManager authMgr = ApplicationRegistry.getInstance().getAuthenticationManager();

        SaslServer ss = null;
        try
        {
            ss = authMgr.createSaslServer(body.mechanism, protocolSession.getLocalFQDN());
            protocolSession.setSaslServer(ss);

            AuthenticationResult authResult = authMgr.authenticate(ss, body.response);

            switch (authResult.status)
            {
                case ERROR:
                    throw new AMQException("Authentication failed");
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.AuthenticationManager

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.