当我们在支持PKCE的web应用程序上测试用户流时,我们会得到一个用于配置PKCE的下拉列表。但是,当我们尝试测试自定义策略时,我们得不到这一点。我们是否可以执行某些操作来启用此PKCE配置?
发布于 2021-07-30 05:13:29
我不确定您在这里提到的专门用于PKCE的下拉列表。如果你能分享一张截图以供参考,那就太好了。但是对于PKCE的使用,由于PKCE也是OAuth2.0流程的一部分,因此自定义策略中的设置将与任何社交媒体声明提供者/身份提供者的设置相同。您可以参考我们的SocialAndLocalAccount策略中的Facebook claim设置以获取更多信息。
供参考:共享Github索赔提供者的摘录:
<ClaimsProvider>
<Domain>github.com</Domain>
<DisplayName>GitHub</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="GitHub-OAuth2">
<DisplayName>GitHub</DisplayName>
<Protocol Name="OAuth2" />
<Metadata>
<Item Key="ProviderName">github</Item>
<Item Key="authorization_endpoint">https://github.com/login/oauth/authorize</Item>
<Item Key="AccessTokenEndpoint">https://github.com/login/oauth/access_token</Item>
<Item Key="ClaimsEndpoint">https://api.github.com/user</Item>
<Item Key="BearerTokenTransmissionMethod">AuthorizationHeader</Item>
<Item Key="scope">user</Item>
<Item Key="HttpBinding">GET</Item>
<Item Key="UserAgentForClaimsExchange">CPIM-Basic/{tenant}/{policy}</Item>
<!-- Update the Client ID below to the Application ID -->
<Item Key="client_id">xxxxxxxxxxxxxxxxxx</Item>
</Metadata>
<CryptographicKeys>
<Key Id="client_secret" StorageReferenceId="B2C_1A_GithubSecret"/>
</CryptographicKeys>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" />
<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="email" />
<OutputClaim ClaimTypeReferenceId="numericUserId" PartnerClaimType="id" />
<!-- <OutputClaim ClaimTypeReferenceId="UserId" /> -->
<OutputClaim ClaimTypeReferenceId="issuerUserId" />
<OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="github.com" AlwaysUseDefaultValue="true" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" />
</OutputClaims>
<OutputClaimsTransformations>
<OutputClaimsTransformation ReferenceId="CreateIssuerUserId" />
<OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName"/>
<OutputClaimsTransformation ReferenceId="CreateUserPrincipalName"/>
<OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId"/>
<OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId"/>
</OutputClaimsTransformations>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin" />
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider> 如果您查看此示例,您将发现有一个名为<Protocol Name="OAuth2" />的元素,这将启用对此声明提供者的OAuth2.0协议的支持。
https://stackoverflow.com/questions/68474844
复制相似问题