Class CachingPublicKeyAuthenticator

    • Constructor Detail

      • CachingPublicKeyAuthenticator

        public CachingPublicKeyAuthenticator​(PublickeyAuthenticator authenticator)
    • Method Detail

      • authenticate

        public boolean authenticate​(java.lang.String username,
                                    java.security.PublicKey key,
                                    ServerSession session)
        Description copied from interface: PublickeyAuthenticator
        Checks whether the given PublicKey is allowed to be used for authenticating user "username" in a session.

        Note that the key may be a OpenSshCertificate. A typical implementation for a certificate would check that the certificate's CA key is known to be trusted as a certificate authority, and that the given user name is listed in the certificate's principals.

        Specified by:
        authenticate in interface PublickeyAuthenticator
        Parameters:
        username - the username
        key - the key
        session - the server session
        Returns:
        true if the key may be used; false otherwise
      • resolveCachedResults

        protected java.util.Map<java.security.PublicKey,​java.lang.Boolean> resolveCachedResults​(java.lang.String username,
                                                                                                      java.security.PublicKey key,
                                                                                                      ServerSession session)