Hi Maxim, On Tue, Feb 24, 2015 at 6:09 PM, Maxim Solodovnik <solomax...@gmail.com> wrote:
> Hello All, > > recently I have proposed the patch to reduce copy/paste while implementing > custom IAuthenticationStrategy. > https://issues.apache.org/jira/browse/WICKET-5823 > > Actually this interface have 2 methods which are not correlate to each > other > String[] load(); > void save(final String username, final String password); > > in fact this is getter and setter but with different signatures > The change I would like to propose is to replace (in Wicket7) > void save(final String username, final String password); > with > void save(final String... credentials); > > this will allow to easily store additional credentials (like domain) and > will not introduce the code break since previous calls will work as > expected > > What do you think? > Replacing #save(String, String) with #save(String, String, String...) looks better to me. This way it guarantees that the username and password are still provided. Or maybe with #save(String, String...) - if only one thing will be saved (e.g. a token?!). #save(String...) suggests that it is possible to save nothing. I don't see a use case for this. In the patch for Wicket 7.x in WICKET-5823 you added a new method to the API, instead of replacing the old one. Having several #save() methods didn't look OK to me. > > -- > WBR > Maxim aka solomax >