C# 如何在Azure B2c中将IdentityServer 3或4用作自定义策略

C# 如何在Azure B2c中将IdentityServer 3或4用作自定义策略,c#,asp.net,azure,C#,Asp.net,Azure,github问题参考: 到目前为止,我已经尝试与邮递员我得到JWT令牌作为回应回来 当我尝试使用Azure ad B2c自定义策略/TrustFrameworkExtensions.xml时 我无法拨打post电话或获得任何JWT令牌作为回复。 我们在回复url页面上得到的错误是:租户不包含所需的加密密钥 知道有人在社区里做过什么吗。谢谢 <ClaimsProviders> <ClaimsProvider> <Domain>ACSL</Domai

github问题参考:

到目前为止,我已经尝试与邮递员我得到JWT令牌作为回应回来

当我尝试使用Azure ad B2c自定义策略/TrustFrameworkExtensions.xml时 我无法拨打post电话或获得任何JWT令牌作为回复。 我们在回复url页面上得到的错误是:租户不包含所需的加密密钥

知道有人在社区里做过什么吗。谢谢

<ClaimsProviders>
<ClaimsProvider>
    <Domain>ACSL</Domain>
    <DisplayName>Login using ACSL</DisplayName>
    <TechnicalProfiles>
        <TechnicalProfile Id="ContosoProfile">
            <DisplayName>ACSL Employee</DisplayName>
            <Description>Login with your ACSL account</Description>
            <Protocol Name="OpenIdConnect"/>
            <OutputTokenFormat>JWT</OutputTokenFormat>
            <Metadata>
                <Item Key="METADATA">https://kamidp.azurewebsites.net/core/.well-known/openid-configuration</Item>
                <Item Key="ProviderName">ACSL</Item>
                <Item Key="authorization_endpoint">https://kamidp.azurewebsites.net/core/connect/authorize</Item>
                <Item Key="AccessTokenEndpoint">https://kamidp.azurewebsites.net/core/connect/token</Item>
                <Item Key="ClaimsEndpoint">https://kamidp.azurewebsites.net/core/connect/userinfo</Item>
                <Item Key="ClaimsEndpointAccessTokenName">id_token</Item>
                <Item Key="ClaimsEndpointFormatName">format</Item>
                <Item Key="ClaimsEndpointFormat">json</Item>
                <Item Key="scope">api1</Item>
                <Item Key="HttpBinding">POST</Item>
                <Item Key="UsePolicyInRedirectUri">0</Item>
                <Item Key="client_id">renukey</Item>
            </Metadata> 
            <CryptographicKeys>
            <Key Id="AcslExt" StorageReferenceId="B2C_1A_AcslExt"/>
            </CryptographicKeys>                
            <OutputClaims>
                <OutputClaim ClaimTypeReferenceId="socialIdpUserId" PartnerClaimType="oid"/>
                <OutputClaim ClaimTypeReferenceId="tenantId" PartnerClaimType="tid"/>
                <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" />
                <OutputClaim ClaimTypeReferenceId="surName" PartnerClaimType="family_name" />
                <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" />
                <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="contosoAuthentication" />
                <OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="AzureADContoso" />
            </OutputClaims>
            <OutputClaimsTransformations>
                <OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName"/>
                <OutputClaimsTransformation ReferenceId="CreateUserPrincipalName"/>
                <OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId"/>
                <OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId"/>
            </OutputClaimsTransformations>
            <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop"/>
        </TechnicalProfile>
    </TechnicalProfiles>
</ClaimsProvider> 
答案就在这里

ChrisPadgetLivecom在3分钟前发表了评论 太好了,@kamranbashir,你能把上面的问题和azure-ad-b2c标签一起发布到Stack Overflow上,这样它就可以被回答,然后被其他人发现吗