Hi,

You simply get the user from Environment parameter :
public void start(Environment env) throws IOException {
 env.getEnv().get(Environment.ENV_USER);
 ...
}

When the command is executed, you're sure the user has been authenticated
(thru filters).

Regards,
Frederic

On Tue, Nov 22, 2011 at 09:28, Tomek Koprowski <to...@koprowski.org> wrote:

> Hi,
> I'm developing a multi-user application based around MINA SSHD using
> CommandFactory (I don't need a shell). The problem is as follows: commands
> should behave differently depending on logged on user (somewhat like
> executing on the user's behalf). To do that I need to know _who_ is my
> command serving but I can't figure out a way to do that.
>
> Is there a way to pass the username into a Command created by the
> CommandFactory?
>
> Regards,
> Tomek
>
> --
> [ mailto:to...@koprowski.org  gg#:2348134 ]
> [       http://koprowski.org/photo        ]
> [    Life is as bad as you make it be     ]
>
>


-- 
Frédéric Menou

Reply via email to