<div dir="ltr">The SPI is called "authenticator", not "authentication", so it should be:<div><br></div><div><p class="MsoNormal" style="font-size:12.8px;text-indent:0.5in">"<span style="font-size:small;text-indent:0px">authenticator</span>": {</p><p class="MsoNormal" style="font-size:12.8px"> "xyz-username-password-authenticator": {</p><p class="MsoNormal" style="font-size:12.8px"> "tvUrl": "<a href="https://192.168.0.11/TokenValidator/TokenValidator.asmx" target="_blank">https://192.168.0.11/TokenValidator/TokenValidator.asmx</a>"</p><p class="MsoNormal" style="font-size:12.8px"> }</p><p class="MsoNormal" style="font-size:12.8px"> }</p><p class="MsoNormal" style="font-size:12.8px"><br></p><p class="MsoNormal" style="font-size:12.8px">Assuming <span style="font-size:12.8px">"xyz-username-password-</span><span style="font-size:12.8px">authenticator" is what's returned by your factories getId method.</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 June 2016 at 04:26, Eric Son 3016 <span dir="ltr"><<a href="mailto:desk3016@live.com" target="_blank">desk3016@live.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
<div dir="ltr">
<p class="MsoNormal">Hi Stian,</p><p class="MsoNormal"><br></p><p class="MsoNormal">For elaborating previous question, I am creating a authentication provider, which needs to
call an external API. </p><p class="MsoNormal"><span style="font-size:12pt">The payloads needs be encrypted with a key before calling
the API. </span></p><p class="MsoNormal"><span style="font-size:12pt"><br></span></p><p class="MsoNormal"><span style="font-size:12pt">I want API URL and Path of the Key to be configurable, so that Ops
team can tweak that based on each environment. </span></p><p class="MsoNormal"><span style="font-size:12pt"><br></span></p><p class="MsoNormal"><span style="font-size:12pt">I’ll be using KeyCloak in
multi-tenant environment, so rather than configuring it at authenticator level
for each relam, we want to configure these settings at system level.</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I came across this link <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/providers.html#d4e559" target="_blank">http://keycloak.github.io/docs/userguide/keycloak-server/html/providers.html#d4e559</a>
which shows how you can pass configuration to providers. </p><p class="MsoNormal"><br></p><p class="MsoNormal">I tried to do the same
thing for my authentication provider but that didn’t work. Not Sure if it
matters but I am using KeyCloak version 1.9.3.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This is what I put in keycloak-server.json. Here
“xyz-username-password-authenticator” is my provider ID. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-indent:.5in">"authentication": {</p>
<p class="MsoNormal">
"xyz-username-password-authenticator": {</p>
<p class="MsoNormal">
"tvUrl": "<a href="https://192.168.0.11/TokenValidator/TokenValidator.asmx" target="_blank">https://192.168.0.11/TokenValidator/TokenValidator.asmx</a>"</p>
<p class="MsoNormal">
}</p>
<p class="MsoNormal">
}</p>
<p class="MsoNormal">I also tried it by putting following configuration i.e. by
removing the “authentication” element from above config.</p>
<p class="MsoNormal" style="text-indent:.5in"> </p>
<p class="MsoNormal" style="text-indent:.5in">"xyz-username-password-authenticator":
{</p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in">"tvUrl":
"<a href="https://192.168.0.11/TokenValidator/TokenValidator.asmx" target="_blank">https://192.168.0.11/TokenValidator/TokenValidator.asmx</a>"</p>
<p class="MsoNormal">
}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Can you please guide me how can I pass these configurations
to my authentication providers?</p><p class="MsoNormal"><br></p><p class="MsoNormal">Thanks!</p><p class="MsoNormal"><br></p><p class="MsoNormal">Best Regards,</p><p class="MsoNormal"><br></p><p class="MsoNormal">WJ</p>
<br><br><div><hr>Date: Mon, 6 Jun 2016 08:00:07 +0200<br>Subject: Re: [keycloak-dev] Config File for token validator endpoints url in keycloak?<br>From: <a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a><br>To: <a href="mailto:desk3016@live.com" target="_blank">desk3016@live.com</a><br>CC: <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><div><div class="h5"><br><br><div dir="ltr">Please elaborate on what your use-case is.</div><div><br><div>On 3 June 2016 at 19:09, Eric Son 3016 <span dir="ltr"><<a href="mailto:desk3016@live.com" target="_blank">desk3016@live.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi, <br><br>I would like to use external token validator with the keycloak.<br> Is there any existing configuration file for storing token validator API endpoints url and its public key info?<br>I want to set them up in "System level" rather than the "Execution level" in the code.<br><br>Thanks for the help!<br><br>Best Regards,<br><br>WJ<br><br>                                            </div></div>
<br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div></div></div></div></div>
                                           </div></div>
</blockquote></div><br></div>