【问题标题】:Set authentification/authorization page in specific language设置特定语言的认证/授权页面
【发布时间】:2019-03-23 02:26:42
【问题描述】:

在我基于 Forge 的 Web 应用程序中,我需要用户登录到他的 Autodesk 帐户,然后授权该应用程序访问/写入 BIM 360 Team(三足身份验证)。

他第一次登录时,这些页面以英文显示。如果他注销然后再次登录,它们是法语的(因为该帐户属于法国用户?)。

我怎么能总是用法语展示它们,即使在开始时也是如此? 我正在使用以下端点:

    [HttpGet]
    [Route("api/forge/oauth/url")]
    public string GetOAuthURL()
    {
        ThreeLeggedApi _threeLeggedApi = new ThreeLeggedApi();

        string oauthUrl = _threeLeggedApi.Authorize(
            Credentials.GetAppSetting("FORGE_CLIENT_ID"),
            oAuthConstants.CODE,
            Credentials.GetAppSetting("FORGE_CALLBACK_URL"),
            new Scope[] { Scope.DataRead, Scope.DataCreate, Scope.DataWrite, Scope.ViewablesRead, Scope.BucketRead, Scope.BucketCreate });

        return oauthUrl;
    }

提前致谢。

【问题讨论】:

    标签: autodesk-forge autodesk-data-management


    【解决方案1】:

    如果登录页面没有用户信息(例如来自上一个会话的 cookie),它将假定浏览器语言偏好。抱歉,我们没有自定义选项。

    【讨论】:

    • 我的浏览器语言偏好设置为法语,但它会将我重定向到英语登录页面...可惜我们没有设置这个选项。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-09
    • 1970-01-01
    • 1970-01-01
    • 2015-10-25
    • 2017-01-14
    • 2012-10-22
    相关资源
    最近更新 更多