<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">+1<br>
<br>
Bill already has dynamic validations in Authentication SPI, which
is used just for registrations now. Wonder if SPI can be
reused/enhanced somehow, so you can easily apply validation on all
3 places. And having the default validators based on mandatory
attribute + regex and admin UI for define this. Hopefully
something like we have for password policy (or OTP policy) can
work for validators too.<br>
<br>
Marek<br>
<br>
On 06/11/15 15:23, Stian Thorgersen wrote:<br>
</div>
<blockquote
cite="mid:CAJgngAdWHVU-iA50-87xvpAmR7t2AKmo=Fy6M9ZNg7tMBY1dbg@mail.gmail.com"
type="cite">
<div dir="ltr">You're right validation is required now. I feel a
new Validation SPI coming up?</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 6 November 2015 at 15:21, Marek
Posolda <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Sure, if it's not a blocker for <a
moz-do-not-send="true" href="http://jboss.org"
target="_blank">jboss.org</a> team to not have it in
1.0 ? I guess dynamic templates can be postponed, but at
least missing validation for account mgmt and update
profile is quite a gap IMO. <br>
<br>
I've discussed this with Vlasta a week or two ago (and
that's one of main reasons to write this email btv <span><span>
:-) </span></span>)<span class="HOEnZb"><font
color="#888888"><br>
<br>
Marek</font></span>
<div>
<div class="h5"><br>
<br>
On 06/11/15 15:04, Stian Thorgersen wrote:<br>
</div>
</div>
</div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">I think this is something to look at
next year. We don't have the resources to do it
properly now. My vote is to add it to the agenda
for F2F.<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 6 November 2015 at
14:36, Marek Posolda <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mposolda@redhat.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:mposolda@redhat.com">mposolda@redhat.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex"><span>On
05/11/15 17:11, Bill Burke wrote:<br>
><br>
> On 11/5/2015 5:46 AM, Marek Posolda
wrote:<br>
>> I wonder if we should improve
handling of custom attributes in<br>
>> freemarker templates and their
validation. Let's assume that I want to<br>
>> add custom attribute "birthday"
and I want to add it to all screens<br>
>> where user can create/edit
account. I can see those issues:<br>
>><br>
>> - Admin will need to edit 3
separate freemarker templates
(registration,<br>
>> account management, update
profile page) to have this attribute<br>
>> displayed on all those places.<br>
>><br>
> we've discussed this before. The
problem is formatting in each of the<br>
> UIs. Often ordering of attributes is
important. Grouping of attributes<br>
> is a must too.<br>
><br>
> i.e. Address, State, Country, Postal
Code<br>
><br>
> These 4 attribute must be grouped
together, and address must come before<br>
> state, and so on.<br>
><br>
> You might also have a "Billing
Address" group that needs to come after<br>
> Home Address group.<br>
</span>I am not seeing an issue with
ordering? The same order you configure in<br>
admin console, the same is used in template.
It's classic sorted list,<br>
not special tricks needed IMO. The grouping
some attributes can be<br>
easily addressed too IMO.<br>
<span>><br>
> So, we'd have an automatic way for
displaying attributes, then the<br>
> developer would think "that looks
like shit" and want to format things<br>
> himself. Stian seems to think that
CSS will solve this problem, but I'm<br>
> not convinced.<br>
</span></blockquote>
<div><br>
</div>
<div>CSS can do a hell of a lot more than you
think it can ;)</div>
<div><br>
</div>
<div>But, I agree it can't always cover
everything - that's why I've been saying we
need to be able to define templates, but at
a smaller granularity. Having to define the
whole update-profile page just to add an
attribute is not very elegant.</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex"><span> </span>I
agree we can't address all possible sort of
issues, but IMO it's good<br>
to have something, which will address 90% of
cases? We can provide types<br>
(like combobox "Gender" with values "male" /
"female" ). We can also<br>
handle multivalued attributes. And most
importantly we can provide<br>
validations for all 3 screens. People won't
need to write their own Java<br>
validators when they want something simple
like ensure "mandatory" field<br>
present or validate with regex. They will
still have possibility to<br>
inject the custom validator if they want it.<br>
<br>
At least validation is must IMO as there is
no way to add custom<br>
validation for account mgmt or update
profile right now.<br>
<br>
What we can't easily do is client-side
validation and stuff for<br>
display/hide something based on value of
other attributes (For example<br>
display attribute "Favourite car sign" just
if selected gender is "male"<br>
). But not sure if this is often
requirement.<br>
<br>
I am seeing lot of similarity with your
kc-provider-config directive in<br>
admin console. It can't address all
"generic" sort of things and<br>
client-side stuff etc. But for most cases,
it's sufficient.<br>
<span>><br>
> Also the look and feel could be quite
different between registration,<br>
> update profile, account management,
and the admin profile. IMO, it<br>
> would end up being easier to just
edit the freemarker pages directly<br>
> than to have to define each attribute
and how it is grouped, ordered,<br>
> and displayed on each of the pages
within an admin console UI.<br>
><br>
><br>
</span>There could be 3 checkboxes where can
admin select if he wants to add<br>
field on registration, account mgmt and
update profile. I am not sure if<br>
we need anything for admin console as we
already have "Attributes" tab<br>
for users, which is almost ok IMO (we don't
have nice solution for<br>
multivalued attributes).<br>
<span><font color="#888888"><br>
Marek<br>
</font></span>
<div>
<div>_______________________________________________<br>
keycloak-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org"
target="_blank">keycloak-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-dev"
rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>