Package org.exolab.jms.common.security

Examples of org.exolab.jms.common.security.BasicPrincipal


     * object exported via {@link ORB#exportObject(Object, String)}.
     *
     * @throws Exception for any error
     */
    public void testExportObjectURIWithAuth() throws Exception {
        BasicPrincipal principal = new BasicPrincipal("second", "secret");
        checkExportObjectURI(principal);
    }
View Full Code Here


     * object exported via {@link ORB#exportObjectTo(Object)}.
     *
     * @throws Exception for any error
     */
    public void testExportObjectToWithAuth() throws Exception {
        BasicPrincipal principal = new BasicPrincipal("third", "secret");
        checkExportObjectTo(principal);
    }
View Full Code Here

     * object exported via {@link ORB#exportObjectTo(Object, String)}.
     *
     * @throws Exception for any error
     */
    public void testExportObjectToURIWithAuth() throws Exception {
        BasicPrincipal principal = new BasicPrincipal("fourth", "secret");
        checkExportObjectToURI(principal);
    }
View Full Code Here

        String principal = (String) properties.get(SECURITY_PRINCIPAL);
        String credentials = (String) properties.get(SECURITY_CREDENTIALS);
        Principal subject = null;

        if (principal != null) {
            subject = new BasicPrincipal(principal, credentials);
        }

        try {
            registry = Locator.getRegistry(subject, uri, _manager,
                    getProxyClassLoader(),
View Full Code Here

            throws ExportException {
        URI result;
        try {
            Principal subject = null;
            if (principal != null) {
                subject = new BasicPrincipal(principal, credentials);
            }
            Connection connection = _manager.getConnection(subject, uri);
            result = connection.getLocalURI();

            // @todo - closing the connection will work for now in that
View Full Code Here

                throw new IOException(
                        "Cannot authenticate with principal of type "
                                + principal.getClass().getName());
            }
            if (principal != null) {
                BasicPrincipal basic = (BasicPrincipal) principal;
                _out.writeByte(AUTH_BASIC);
                _out.writeUTF(basic.getName());
                _out.writeUTF(basic.getPassword());
            } else {
                _out.writeByte(AUTH_NONE);
            }
            _out.flush();
            if (_in.readByte() != AUTH_OK) {
View Full Code Here

            switch (type) {
                case AUTH_BASIC:
                    String name = _in.readUTF();
                    String password = _in.readUTF();
                    principal = new BasicPrincipal(name, password);
                    break;
                case AUTH_NONE:
                    break;
                default:
                    throw new IOException("Invalid packet type: " + type);
View Full Code Here

TOP

Related Classes of org.exolab.jms.common.security.BasicPrincipal

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.