Package io.fathom.cloud.protobuf.IdentityModel

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


    }

    private void setSecret(NamedItemCollection<AttachmentData> store, ClientApp app, SecretData data)
            throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        AttachmentData.Builder b;
        if (existing == null) {
            b = AttachmentData.newBuilder();
            b.setKey(appKey);
        } else {
View Full Code Here


    }

    private byte[] findUserSecret(NamedItemCollection<AttachmentData> store, ClientApp app, AuthenticatedUser user)
            throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        if (existing == null) {
            return null;
        }

        SecretData secretData = existing.getData();

        try {
            byte[] plaintext = appSecrets.decryptUserSecret(user, secretData);
            return plaintext;
        } catch (KeyczarException e) {
View Full Code Here

    }

    private byte[] findProjectSecret(NamedItemCollection<AttachmentData> store, ClientApp app,
            AuthenticatedProject project) throws CloudException {
        String appKey = app.getAppId();
        AttachmentData existing = store.find(appKey);
        if (existing == null) {
            return null;
        }

        SecretData secretData = existing.getData();

        try {
            byte[] plaintext = appSecrets.decryptProjectSecret(project, secretData);
            return plaintext;
        } catch (KeyczarException e) {
View Full Code Here

TOP

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

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.