On 31/07/2013 22:07, Niklas Gustavsson wrote:

>> It's possible to deploy FTP Server post 1.0.8 in an OSGi
>> container.

Sorry, I meant post 1.0.6.  There is no 1.0.8 (yet).

> Anyhow, the idea is that the UserManager/User shouldn't need to
> care about Authority/AuthorizationRequest implementations.

I'd agree with that, but as the USER class creates a specific
AuthorizationRequest to pass into the User, then clearly the User
implementation needs to be able to do something with it.

We could move the methods getConcurrentLogins() and
getConcurrentLoginsFromThisIP() to the User interface, and call
those methods directly from USER.execute().  It can be argued that
the precedent for having properties on the User has been set by the
maxIdleTime.  However it obviously doesn't scale well, and changes
the API.

A more subtle change would be to create something like:-

public interface ConcurrentLoginAuthorizationRequest extends
AuthorizationRequest

.. within the ftplet-api.  The existing ConcurrentLoginRequest can
then implement this new interface instead.

This would be a non-breaking change and allow User implementations
to handle the authorise request.

Then the same could be done for the other AuthorizationRequest
classes, though I've not looked into where they are used yet.
Having a bit of problem getting set up with GIT and importing the
project/modules into Eclipse properly.

Reply via email to