Bnd10706
Bnd10706

Reputation: 2383

Sending a Claim in a validation Technical Profile

I am dong a validation check to our database during our password forget policy. During this process, it calls and API and needs a bearer token. I already have a technical profile to do this we use in another step.

So in this process, It keeps failing to look for the bearer token. It is saying the only token available in the email.

I need to do a step in between to get the bearer token, but I'm not sure how to do that since I'm doing a validation...

Here is what I have. After I type in the email to validate it.

<ClaimsProvider>
      <DisplayName>REST API to Check Member</DisplayName>
     <TechnicalProfiles>
      <TechnicalProfile Id="LocalAccountDiscoveryUsingEmailAddress">
          <ValidationTechnicalProfiles>
            <ValidationTechnicalProfile ReferenceId="REST-CheckMemberAccountHolder" ContinueOnError="false"/>
          </ValidationTechnicalProfiles>
        </TechnicalProfile>

        <TechnicalProfile Id="REST-CheckMemberAccountHolder">
          <DisplayName>Rest API call to Check Member status</DisplayName>
          <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
          <Metadata>
            <Item Key="ServiceUrl">{API}</Item>
            <Item Key="SendClaimsIn">Body</Item>
            <Item Key="AuthenticationType">Bearer</Item>
            <Item Key="UseClaimAsBearerToken">bearerToken</Item>
            <Item Key="AllowInsecureAuthInProduction">false</Item>
          </Metadata>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="email" PartnerClaimType="emailaddress"/>
            <InputClaim ClaimTypeReferenceId="bearerToken" />
          </InputClaims>
        </TechnicalProfile>
      </TechnicalProfiles>
    </ClaimsProvider>

I need it to call

 <TechnicalProfile Id="REST-AcquireAccessToken">

To get the bearertoken for the REST call in the validation.

I cant seem to figure out how to do it.

Upvotes: 0

Views: 417

Answers (1)

rbrayb
rbrayb

Reputation: 46773

As per this, I assume you had something like:

<OutputClaims>
    <OutputClaim ClaimTypeReferenceId="bearerToken" PartnerClaimType="access_token" />
</OutputClaims>

when you acquired the token?

Is this all part of the same user journey?

What do you mean by "saying the only token available in the email"?

Upvotes: 0

Related Questions