<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>A little tweak needed, because I had to create a new template since I can use the existing one, but it works.<br><br>Thanks!<br><br><div><hr id="stopSpelling">Date: Mon, 6 Jun 2016 08:11:02 +0200<br>Subject: Re: [keycloak-user] Realm Resource Provider<br>From: sthorger@redhat.com<br>To: palermo@pobox.com<br>CC: keycloak-user@lists.jboss.org<br><br><div dir="ltr">You can try session.getProvider(LoginFormsProvider.class).createForm("template.ftl")</div><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On 1 June 2016 at 16:58, Bruno Palermo <span dir="ltr">&lt;<a href="mailto:palermo@pobox.com" target="_blank">palermo@pobox.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr">Yes, it does. But it uses 'RequiredActionContext' context, how can I have access to this context inside 'RealmResourceProvider'<span style="color:rgb(121,93,163);font-family:Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;display:inline !important;background-color:rgb(255,255,255);"></span>?<br><br>'RealmResourceProviderFactory' create method is:<br><br>@Override<br>public RealmResourceProvider create(KeycloakSession session)<br><br><div><hr>Date: Wed, 1 Jun 2016 15:39:43 +0200<br>Subject: Re: [keycloak-user] Realm Resource Provider<br>From: <a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a><br>To: <a href="mailto:palermo@pobox.com" target="_blank">palermo@pobox.com</a><br>CC: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><div><div class="h5"><br><br><div dir="ltr">Try looking at the authenticator provider example I believe that does it</div><div><br><div>On 1 June 2016 at 14:38, Bruno Palermo <span dir="ltr">&lt;<a href="mailto:palermo@pobox.com" target="_blank">palermo@pobox.com</a>&gt;</span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr">Hi,<br><br>I just create a custom resource provider. It's possible to render a freemarker template as response?<br><br><a href="https://github.com/keycloak/keycloak/blob/master/server-spi/src/main/java/org/keycloak/services/resource/RealmResourceProvider.java" target="_blank">https://github.com/keycloak/keycloak/blob/master/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProvider.java</a><br><br><br>Thanks,<br>Bruno<br>                                               </div></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div></div></div></div>                                               </div></div>
</blockquote></div><br></div></div>                                               </div></body>
</html>