Package io.fathom.cloud.protobuf.IdentityModel

Examples of io.fathom.cloud.protobuf.IdentityModel.ClientAppData


    }

    @Override
    public ClientApp findClientAppByName(Project project, String appName, String appPassword) throws CloudException {
        ClientAppData clientApp = getStore(project.getId()).find(appName);
        if (clientApp == null) {
            log.debug("App '{}' not found in project", appName);
            return null;
        }
View Full Code Here


            return null;
        }

        String project = appId.substring(0, firstColon);
        String appName = appId.substring(firstColon + 1);
        ClientAppData clientApp = getStore(Long.valueOf(project)).find(appName);
        if (clientApp == null) {
            log.debug("App '{}' not found in project", appId);
            return null;
        }
View Full Code Here

            ClientAppSecretData.Builder sb = ClientAppSecretData.newBuilder();
            sb.setAppPassword(appPassword);
            secrets = sb.build();
        }

        ClientAppData existing = getStore(project.getId()).find(appName);
        if (existing != null) {
            throw new WebApplicationException(Status.CONFLICT);
        }

        ClientAppData.Builder b = ClientAppData.newBuilder();
        b.setProject(project.getId());
        b.setKey(appName);

        SecretToken secretToken = SecretToken.create(SecretTokenType.CLIENT_APP_SECRET);

        buildSecretStore(b, secretToken, appPassword, authenticatedProject);
        b.setSecretData(Secrets.buildClientAppSecret(secretToken, secrets));

        try {
            ClientAppData app = getStore(project.getId()).create(b);
            return new ClientAppImpl(app, secrets);
        } catch (DuplicateValueException e) {
            throw new WebApplicationException(Status.CONFLICT);
        }
    }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.protobuf.IdentityModel.ClientAppData

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.