Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-5

Make the ServerSession available to Command implementations

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 0.1.0
    • None

    Description

      Within my Command class I need to know the username that was authenticated; e.g. the value returned by ServerSession.getUsername():

      class AnyCommand implements Command, NeedsServerSession {
      protected ServerSession session;
      ...
      public void setServerSession(final ServerSession session)

      { this.session = session; }

      public void start() throws IOException {
      System.err.println("From " + session.getUsername());
      System.err.println("

      {" + command + "}

      ");
      ...
      }
      }

      Attachments

        1. get_serversession.diff
          1 kB
          Shawn Pearce

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              spearce Shawn Pearce
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: