Rework password expiration template messages customization (#30) #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reading the Java class mentioned in issue #30, it seems that only 2 properties were modified in the original messages.properties from the classpath (what about the other languages ?).
This commit should provide the same behaviour as the original PR. I had to reintroduce the pwdupdateform.html fragment from upstream, and customize the (hardcoded ?) URLs to get into the console webservices meant for password management. FTR, the original template is here:
https://github.com/apereo/cas/blob/6.6.x/support/cas-server-support-thymeleaf/src/main/resources/templates/fragments/pwdupdateform.html
BTW, it looks like CAS provides such password management from the user on its own code, via an optional module:
https://apereo.github.io/cas/7.0.x/password_management/Password-Management-Reset.html
but since we already have the feature provided by the console, it makes probably more sense to make use of them instead.
Note: I am not sure why the
password.expiration.warning
does not seem to be used in any templates in the CAS6.6 codebase.Note2: we might want to be able to customize the console's endpoint url from the datadir, but since they were hardcoded in the java class, at least we are isofunctional here.
tests: runtime, using https://github.com/georchestra/sample-docker-composition/tree/main/cas/password-expiration