1

The site I am developing supports sign-in with the default SimpleOpenIDSelector providers (the same providers that are listed on stackoverflow login page). While it works for simple sign-ins, my AX-required requests remain unfulfilled. For example, Blogger does not disclose first/last/friendly name through AX.

How can I ensure that I get a string that is the user's preferred name? What are the possible workarounds or alternatives or standard methods of dealing with this?

I am using the latest python-openid library.

4

1 回答 1

1

你不能。由于 SREG 和 AX 是 OpenID 的扩展,因此您不能指望每个人都使用它,因此您不能确定您是否会从提供者那里获得任何数据。

处理此问题的标准方法是使用带有缺失字段的普通注册表单。只需使用提供商提供的 SREG/AX 数据来方便用户(就像他在您的注册表单中手动输入数据一样),而不是您应该依赖的东西。

于 2011-08-29T06:14:43.633 回答