Package io.fathom.cloud.server.auth

Examples of io.fathom.cloud.server.auth.Auth


        super("dns-zone-create");
    }

    @Override
    protected DnsZoneData run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        DnsZoneSpec zoneSpec = new DnsZoneSpec();
        zoneSpec.name = zone;
        zoneSpec.backend = backend;
View Full Code Here


    @Inject
    EncryptionStore encryptionStore;

    @Override
    protected Message run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        List<Secret> secrets = secretService.list(auth, project);

        Secret found = null;
        for (Secret secret : secrets) {
View Full Code Here

        super("dns-record-list");
    }

    @Override
    protected List<DnsRecordsetData> run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        DnsZone zone = dns.findZoneByName(project, zoneName);
        if (zone == null) {
            throw new WebApplicationException(Status.NOT_FOUND);
        }
View Full Code Here

    @Inject
    SecretService secretService;

    @Override
    protected Message run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        List<Secret> secrets = secretService.list(auth, project);

        for (Secret secret : secrets) {
            SecretInfo secretInfo = secret.getSecretInfo();
View Full Code Here

    @Inject
    Attachments attachments;

    @Override
    protected Message run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        ClientApp clientApp = attachments.createClientApp(auth, project, appName, appSecret);

        // TODO: Return something useful
        return null;
View Full Code Here

        super("dns-record-delete");
    }

    @Override
    protected DnsRecordsetData run0() throws Exception {
        Auth auth = getAuth();
        Project project = auth.getProject();

        DnsZone zone = dns.findMaximalZone(project, fqdn);
        if (zone == null) {
            throw new IllegalArgumentException("Cannot find matching zone");
        }
View Full Code Here

    }

    @Deprecated
    // This is a dark corner of the OpenStack API
    protected void checkDomainAdmin() {
        Auth auth = getAuth();

        Domain domainAdmin = auth.findDomainWithAdminRole();
        if (domainAdmin == null) {
            log.debug("Expected domain admin: {}", auth);
            throw new WebApplicationException(Status.FORBIDDEN);
        }
    }
View Full Code Here

    @Inject
    SecurityGroups securityGroups;

    @POST
    public WrappedSecurityGroupRule createRule(WrappedSecurityGroupRule request) throws Exception {
        Auth auth = getAuth();

        SecurityGroupRule rule = request.rule;
        long securityGroupId = Long.valueOf(rule.parentGroupId);

        SecurityGroupData securityGroupData = securityGroups.find(getProject(), securityGroupId);
View Full Code Here

    @Produces({ JSON })
    public WrappedCertificate getCertificate(@PathParam("id") String id) throws CloudException {
        // This is entirely wrong
        warnStub();

        Auth auth = getAuth();

        User user = auth.getUser();
        if (user == null) {
            throw new WebApplicationException(Status.UNAUTHORIZED);
        }

        if (!id.equals("root")) {
View Full Code Here

        warnStub();

        WrappedCertificate response = new WrappedCertificate();
        response.certificate = new Certificate();

        Auth auth = getAuth();

        User user = auth.getUser();
        if (user == null) {
            throw new WebApplicationException(Status.UNAUTHORIZED);
        }

        X500Principal subject = new X500Principal("CN=" + "user-" + user.getId());
View Full Code Here

TOP

Related Classes of io.fathom.cloud.server.auth.Auth

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.