code: public static Map<String, Object> connectionDataToMap(ConnectionData connectionData,
                                                            TextEncryptor encryptor) throws CryptoException {
          Map<String, Object> map = new HashMap<>();
          map.put("providerUserId", connectionData.getProviderUserId());
          map.put("displayName", connectionData.getDisplayName());
          map.put("profileUrl", connectionData.getProfileUrl());
          map.put("imageUrl", connectionData.getImageUrl());
          map.put("accessToken", encrypt(connectionData.getAccessToken(), encryptor));
          map.put("secret", encrypt(connectionData.getSecret(), encryptor));
          map.put("refreshToken", encrypt(connectionData.getRefreshToken(), encryptor));
          map.put("expireTime", connectionData.getExpireTime());
  
          return map;
      }
docs: Creates a new map from the specified {@link ConnectionData}. Used when
  connection data needs to be stored in a profile.
  
  @param connectionData    the connection data to convert
  @param encryptor         the encryptor used to encrypt the accessToken, secret and refreshToken (optional)
  
  @return the connection data as a map