While playing with our new Jülich DATA Beta service, I discovered that the username set in the authentication provider is never used in the first login form. This should be changed.


Digging into the code. I set the field during auth:
|
OAuth2UserRecord getUserRecord(UserInfo userInfo) { |
|
return new OAuth2UserRecord( |
|
this.getId(), |
|
userInfo.getSubject().getValue(), |
|
userInfo.getPreferredUsername(), |
|
null, |
But the view is simply requesting the username attribute, which is never set in OAuth2FirstLoginPage.init():
|
<div class="col-sm-4"> |
|
<p:inputText id="username" styleClass="form-control" value="#{OAuth2FirstLoginPage.username}" validator="#{OAuth2FirstLoginPage.validateUserName}"/> |
|
<p:message for="username" display="text"/> |
|
</div> |
As always most of the time: happy to contribute. This looks like it was not left out on purpose, so dunno if we need a trigger for UI team or just go ahead and fix it.