Skip to content

Commit

Permalink
Added configuration descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kilmajster committed Jun 7, 2021
1 parent 8a809f6 commit 28114b8
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,40 @@ public interface UsernamePasswordAttributeFormConfiguration {
.name(LOGIN_FORM_USER_ATTRIBUTE)
.type(ProviderConfigProperty.STRING_TYPE)
.label("User attribute")
.helpText("TODO")
.helpText("Attribute used to validate login form.")
.add()

.property()
.name(LOGIN_FORM_GENERATE_LABEL)
.type(ProviderConfigProperty.BOOLEAN_TYPE)
.label("Generate label")
.defaultValue("true") // only string value is accepted
.helpText("TODO")
.helpText("If enabled, label for login form will be generated based on attribute name, so attribute with name:" +
" \"foot_size\" will be labeled as \"Foot size\", \"REALLY_custom.user-Attribute\" will be translated " +
"to \"Really custom user attribute\", etc. By default, set to true. If User attribute form label " +
"is configured, label is taken form configuration and generation is skipped.")
.add()

.property()
.name(CLEAR_USER_ON_ATTRIBUTE_VALIDATION_FAIL)
.type(ProviderConfigProperty.BOOLEAN_TYPE)
.label("Clear user on validation fail")
.defaultValue("true") // only string value is accepted
.helpText("TODO")
.helpText("If enabled, user is not stored in session context in case username and password were valid but user attribute was not.")
.add()

.property()
.name(LOGIN_FORM_ATTRIBUTE_LABEL)
.type(ProviderConfigProperty.STRING_TYPE)
.label("User attribute form label")
.helpText("TODO")
.helpText("Message which will be displayed as user attribute input label. If value is a valid message key, then proper translation will be used.")
.add()

.property()
.name(LOGIN_FORM_ERROR_MESSAGE)
.type(ProviderConfigProperty.STRING_TYPE)
.label("Validation error message")
.helpText("TODO")
.helpText("Message which will be displayed as user attribute validation error. If value is a valid message key, then proper translation will be used.")
.add()

.build();
Expand Down

0 comments on commit 28114b8

Please sign in to comment.