WSO2AM 1.10.0 如何设置默认的 OAuth2 授权类型? [英] WSO2AM 1.10.0 How to set default OAuth2 grant types?

查看:17
本文介绍了WSO2AM 1.10.0 如何设置默认的 OAuth2 授权类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 API Manager 商店设置应用程序时,如何使 OAuth2 授权类型授权代码并隐式应用程序的默认值?我知道如何使用 carbon 界面手动执行此操作,但我想将两种授权类型设为默认类型.

When setting up an application from the API Manager store how can I make the OAuth2 grant types authorization code and implicit the defaults for the app? I know how to do this manually using the carbon interface but I would like to make the two grant types the default.

推荐答案

为了默认开启授权码和隐式授权类型,您需要在商店创建应用程序时指定一个回调 URL.当回调 URL 可用时,这 2 种授权类型将在管理控制台上显示为已为相关应用启用

For authorization code and implicit grant types to be enabled by default, you need to specify a callback URL when creating the App on store. When the callback URL is available these 2 grant types will be shown as enabled for the relevant App on management console

即使您通过管理控制台为应用启用授权代码和隐式授权类型,回调 URL 也是必需的.

Callback URL is mandatory even if you enable authorization code and implicit grant types for an App via management console.

由于授权码和隐式授权类型需要回调URL,如果在通过商店创建应用程序时没有指定,服务器将认为该应用程序不支持这些授权类型.这就是为什么在应用的授权类型配置中不会勾选这 2 种授权类型的原因.

Since authorization code and Implicit grant types require a callback URL, if this is not specified during App creation via store, the server will consider that the App does not support these grant type. That is why these 2 grant types will not be ticked in the App's grant type configurations.

如果您需要取消对所有应用程序的特定授权类型的支持,您可以在 /repository/conf/中的 下注释掉以下部分身份/身份/xml

If you need to remove support for a specific grant type for all Apps, you can comment out the following sections under <SupportedGrantTypes> in <AM_HOME>/repository/conf/identity/identity/xml

例如:如果您需要删除密码授予类型,请注释掉以下内容.

Eg: If you need to remove password grant type, comment out the following.

 <SupportedGrantType>
                <GrantTypeName>password</GrantTypeName>
                <GrantTypeHandlerImplClass>org.wso2.carbon.apimgt.keymgt.handlers.ExtendedPasswordGrantHandler</GrantTypeHandlerImplClass>
            </SupportedGrantType>

不要注释掉客户端凭据授权类型,因为这是生成密钥所必需的.

Do not comment out the client credentials grant type as this is required for Key generation.

这篇关于WSO2AM 1.10.0 如何设置默认的 OAuth2 授权类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆