[GitHub] wicket pull request: WICKET-5819 Tracks enum uppercased, startbyte...

2015-02-24 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/100

WICKET-5819 Tracks enum uppercased, startbyte / endbyte refactoring



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket pr-86-media_tags-track

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/100.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #100


commit 9d5daccdb1386c91b5d0316b911957873a36bbfd
Author: klopfdreh klopfdreh@192.168.2.110
Date:   2015-02-24T20:21:53Z

WICKET-5819 Tracks enum uppercased, startbyte / endbyte refactoring




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request: WICKET-5749 add AuthorizeResource to auth-rol...

2015-02-24 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/wicket/pull/99


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[DISCUSSION] WICKET-5823 IAuthenticationStrategy methods

2015-02-24 Thread Maxim Solodovnik
Hello All,

recently I have proposed the patch to reduce copy/paste while implementing
custom IAuthenticationStrategy.

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?

-- 
WBR
Maxim aka solomax


Re: [DISCUSSION] WICKET-5823 IAuthenticationStrategy methods

2015-02-24 Thread Tobias Soloschenko
I thought to take a HashMap, because in the save method you could read the keys 
- but if the load method also returns String[] and the order of credentials is 
well known varags might be ok.

kind regards

Tobias

 Am 25.02.2015 um 05:14 schrieb Maxim Solodovnik solomax...@gmail.com:
 
 Actually load() method return String[] (actually with arbitrary number of
 elements and arbitrary order) so I see no issue here, You read parameters
 in the same order as you wright them.
 MapString,String will make things worst IMHO since the order will not be
 the same
 
 On Wed, Feb 25, 2015 at 4:16 AM, Tobias Soloschenko 
 tobiassolosche...@googlemail.com wrote:
 
 Hi Maxim,
 
 I think this isn't a good idea because the order in which the arguments
 are added to the save method is important - and what if you want to let one
 argument away? Then the rest would not used for their purpose.
 
 Instead I would add another method save method that takes a Map with key
 value pairs (key are used to identify the values)
 map.put(username,tom);
 map.put(password,secret);
 map.put(host,127.0.0.1);
 
 the save method could be invoked internally with
 #save(map.get(username),map.get(password));
 
 Another way:
 
 Oracle uses system properties - (http://docs.oracle.com/
 javase/7/docs/api/java/net/doc-files/net-properties.html)
 System.setProperty(org.apache.auth.username,tom);
 System.setProperty(org.apache.auth.password,secret);
 the save method could be invoked internally with
 #save(System.getProperty(org.apache.auth.username),System.
 getProperty(org.apache.auth.username));
 
 kind regards
 
 Tobias
 
 Am 24.02.15 um 17:09 schrieb Maxim Solodovnik:
 
 Hello All,
 
 recently I have proposed the patch to reduce copy/paste while implementing
 custom IAuthenticationStrategy.
 
 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?
 
 
 -- 
 WBR
 Maxim aka solomax


Re: [DISCUSSION] WICKET-5823 IAuthenticationStrategy methods

2015-02-24 Thread Tobias Soloschenko

Hi Maxim,

I think this isn't a good idea because the order in which the arguments 
are added to the save method is important - and what if you want to let 
one argument away? Then the rest would not used for their purpose.


Instead I would add another method save method that takes a Map with key 
value pairs (key are used to identify the values)

map.put(username,tom);
map.put(password,secret);
map.put(host,127.0.0.1);

the save method could be invoked internally with 
#save(map.get(username),map.get(password));


Another way:

Oracle uses system properties - 
(http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html)

System.setProperty(org.apache.auth.username,tom);
System.setProperty(org.apache.auth.password,secret);
the save method could be invoked internally with 
#save(System.getProperty(org.apache.auth.username),System.getProperty(org.apache.auth.username));


kind regards

Tobias

Am 24.02.15 um 17:09 schrieb Maxim Solodovnik:

Hello All,

recently I have proposed the patch to reduce copy/paste while implementing
custom IAuthenticationStrategy.

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?





Re: [DISCUSSION] WICKET-5823 IAuthenticationStrategy methods

2015-02-24 Thread Maxim Solodovnik
Actually load() method return String[] (actually with arbitrary number of
elements and arbitrary order) so I see no issue here, You read parameters
in the same order as you wright them.
MapString,String will make things worst IMHO since the order will not be
the same

On Wed, Feb 25, 2015 at 4:16 AM, Tobias Soloschenko 
tobiassolosche...@googlemail.com wrote:

 Hi Maxim,

 I think this isn't a good idea because the order in which the arguments
 are added to the save method is important - and what if you want to let one
 argument away? Then the rest would not used for their purpose.

 Instead I would add another method save method that takes a Map with key
 value pairs (key are used to identify the values)
 map.put(username,tom);
 map.put(password,secret);
 map.put(host,127.0.0.1);

 the save method could be invoked internally with
 #save(map.get(username),map.get(password));

 Another way:

 Oracle uses system properties - (http://docs.oracle.com/
 javase/7/docs/api/java/net/doc-files/net-properties.html)
 System.setProperty(org.apache.auth.username,tom);
 System.setProperty(org.apache.auth.password,secret);
 the save method could be invoked internally with
 #save(System.getProperty(org.apache.auth.username),System.
 getProperty(org.apache.auth.username));

 kind regards

 Tobias

 Am 24.02.15 um 17:09 schrieb Maxim Solodovnik:

  Hello All,

 recently I have proposed the patch to reduce copy/paste while implementing
 custom IAuthenticationStrategy.

 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?





-- 
WBR
Maxim aka solomax