Package io.fathom.cloud.protobuf.IdentityModel

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


        if (secretData.hasEncryptedWith() && secretData.getEncryptedWith() != EncryptedWith.SECRET_KEY) {
            throw new IllegalStateException();
        }

        UserSecretData userSecretData;
        try {
            userSecretData = unlock(secretData, secretToken, UserSecretData.newBuilder());
        } catch (IOException e) {
            log.debug("Error decoding secret data (likely because of wrong password)");
            return null;
        }

        // This stuff is deprecated because we sign the secret data
        if (userSecretData.hasDeprecatedVerifyPublicKey()) {
            // throw new IllegalStateException();

            log.warn("UserSecretData has deprecated verify public key");

            //
            // long hash =
            // Hashing.md5().hashBytes(user.getPublicKey().getEncoded().toByteArray()).asLong();
            // if (userSecretData.getDeprecatedVerifyPublicKey() != hash) {
            // // This is unexpected
            // log.warn("Verify public key did not match (but decode did not fail)");
            // return null;
            // }
        } else if (userSecretData.hasDeprecatedVerifyUserId()) {
            log.warn("UserSecretData has deprecated verify user id");

            // // This is deprecated because it makes creation painful. A
            // // pretty crappy reason, really.
            // log.warn("Falling back to deprecated user id validation for user: {}",
View Full Code Here


    @Inject
    Secrets secretService;

    public UserWithSecret migrateUserAddPasswordRecovery(UserWithSecret user, SecretToken secretToken)
            throws CloudException {
        UserSecretData userSecretData = user.userSecretData;
        UserData userData = user.getUserData();

        for (SecretKeyData entry : userData.getSecretStore().getSecretKeyList()) {
            if (entry.getType() == SecretKeyType.ENCRYPTED_WITH_FORGOTPASSWORD_PUBKEY) {
                return user;
View Full Code Here

        return user;
    }

    public UserWithSecret migrateUser(UserWithSecret user, String password, SecretToken secretToken)
            throws CloudException {
        UserSecretData userSecretData = user.userSecretData;
        UserData userData = user.getUserData();

        if (!userData.getPublicKey().hasKeyczar()) {
            log.info("Migrating user to keyczar: {}", user.getUserData());
            Migrations.report(userData);
View Full Code Here

TOP

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

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.