通过Identity Server 4进行WordPress登录

时间:2019-01-31 06:57:03

标签: wordpress identityserver4

将为Wordpress提供通过Identity Server 4登录的机会:我们已经在Wordpress中输入了必要的数据(最近使用了插件“ OAuth Single Sign On-SSO(OAuth客户端)”),并试图解决该问题。身份服务器。请注意所附图片。

WordPress插件的设置: Wordpress plugin settings

不幸的是,我们总是收到消息

  

错误:对不起,出现一个错误:authorized_client。插件   发送以下请求URL:   http://yyyyyy.com/connect/authorize?client_id=wp-internal&scope=openid%20email&redirect_uri=https://xxxxxx.com/wp-admin/admin-ajax.php?action=openid-connect-authorize&response_type=code&state=V29yZHByZXNzIENsaWVudCBJbnRlcm5hbA===

据我们所知,该陈述是正确的-现在我们还不知道该怎么做。您能帮忙还是有个主意?

IdentityServer4上的配置为:

new Client
            {
                ClientId = "wp-internal",
                ClientName = "Wordpress Client Internal",
                AllowedGrantTypes = GrantTypes.Code,
                AllowAccessTokensViaBrowser = false,
                RequireConsent = true,

                ClientSecrets =
                {
                    new Secret("#dfmsgmwpgdidsa2019".Sha256())
                },

                RedirectUris = { "https://xxxxxx.com/wp-admin/admin-ajax.php?action=openid-connect-authorize" },
                PostLogoutRedirectUris = { "https://xxxxxx.com/" },
                FrontChannelLogoutUri = "https://xxxxxx.com/logout",
                LogoUri = "https://xxxxxx.com/logout",
                AllowedCorsOrigins =     { "https://xxxxxx.com" },


                AllowedScopes =
                {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,
                    IdentityServerConstants.StandardScopes.Email
                },

                AllowOfflineAccess = true,
                AlwaysIncludeUserClaimsInIdToken = true
            },

0 个答案:

没有答案