选择内容分享方式
本页介绍了开发者在共享对受控内容的访问权限时应遵循的最佳实践。您可以在协作活动开始之前或进行期间更新权限。
强烈建议您实现一种尽可能减少用户摩擦或干扰的方法。开发者应在应用的访问控制模型和安全要求以及任何用户中断之间保持平衡。
以下是提供对协作活动访问权限的几种方式。
授予临时访问令牌(推荐)
临时(限时)访问令牌可提供在指定时间段内有效的用户访问和安全凭据。如需了解详情,请参阅配置临时访问权限。
这种方法可最大限度地减少用户的使用障碍。拥有链接和临时访问令牌的任何人都可以访问相应内容。用户只能在令牌中指定的时间段内访问,令牌在发起者启动 activity 后生成。
您可以使用activity 启动状态共享令牌。此令牌可兑换临时内容访问权限。临时访问令牌与内容的创建时间无关。这种方法适用于新内容和现有内容。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
尽可能减少用户的操作步骤 |
分享过多内容的风险 |
允许用户在活动开始后加入 |
|
无需事先了解参与者 |
|
在 activity 开始之前分享
另一种方法是,设计 Meet 插件,以提示启动 activity 的用户在开始之前更新权限。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
明确分享可最大限度地降低风险 |
确定参与者可能具有挑战性 |
|
在用户加入时,批准访问权限时会出现中等程度的摩擦或中断 |
按需分享
这是一种响应式方法,当用户请求访问内容时,activity 发起者会实时批准请求。如果未正确确定参与者,此方法可能会给用户带来较大的阻碍。因此,我们最不建议您这样做。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
无需事先了解参与者 |
会造成较大的阻碍,干扰会议的正常进行 |
明确分享可最大限度地降低风险 |
需要在 activity 启动后更新内容权限的路径 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-21。
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["Developers should prioritize methods that minimize user friction when sharing access to controlled content during collaborative activities."],["Temporary access tokens are recommended as they provide a balance between security and ease of use, granting temporary access for a specified period."],["Alternative approaches include pre-activity sharing, requiring permission updates before starting, and on-demand sharing, which involves approving access requests in real-time."],["Each approach has advantages and disadvantages, with on-demand sharing potentially causing the most friction due to real-time approvals."],["Developers need to carefully consider security requirements and potential user disruptions when selecting a sharing method."]]],["Developers should balance security and user experience when sharing access to controlled content. The recommended method is granting temporary access tokens, minimizing user friction by providing time-limited access via a shareable link. Alternatively, sharing before the activity starts offers explicit control but can be challenging to manage participants. On-demand sharing, the least recommended, involves real-time approvals and causes high disruption. Permissions can be modified before or during collaborative activities.\n"]]