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

Make the ServerSession available to Command implementations

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment