Examples of TrustedUserPrincipal


Examples of org.candlepin.auth.TrustedUserPrincipal

    }

    @Test
    public void oauthRegistrationSupported() {
        // Should be able to register successfully with as a trusted user principal:
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer("sys.example.com", null, null, system);
        resource.create(consumer, p, null, owner.getKey(), null);
    }
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

        resource.create(consumer, p, null, owner.getKey(), createKeysString(keys));
    }

    @Test
    public void registerWithNoInstalledProducts() {
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer();
        consumer.setType(system);
        consumer.setName("consumername");
        resource.create(consumer, p, USER, owner.getKey(), null);
    }
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

        resource.create(consumer, p, USER, owner.getKey(), null);
    }

    @Test
    public void registerWithNullReleaseVer() {
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer();
        consumer.setType(system);
        consumer.setName("consumername");
        consumer.setReleaseVer(null);
        resource.create(consumer, p, USER, owner.getKey(), null);
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

    }

    @Test
    public void registerWithEmptyReleaseVer() {
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer();
        consumer.setType(system);
        consumer.setName("consumername");
        consumer.setReleaseVer(new Release(""));
        resource.create(consumer, p, USER, owner.getKey(), null);
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

        resource.create(consumer, p, USER, owner.getKey(), null);
    }

    @Test
    public void registerWithNoReleaseVer() {
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer();
        consumer.setType(system);
        consumer.setName("consumername");
        resource.create(consumer, p, USER, owner.getKey(), null);
    }
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

        resource.create(consumer, p, USER, owner.getKey(), null);
    }

    @Test
    public void setStatusOnCreate() {
        Principal p = new TrustedUserPrincipal("anyuser");
        Consumer consumer = new Consumer();
        consumer.setType(system);
        consumer.setName("consumername");
        resource.create(consumer, p, USER, owner.getKey(), null);
        // Should be called with the consumer, null date (now),
View Full Code Here

Examples of org.candlepin.auth.TrustedUserPrincipal

            log.debug("Looking up user permissions from user service.");
            return createPrincipal(username);
        }

        log.debug("Returning full trusted user principal.");
        return new TrustedUserPrincipal(username);
    }
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.