Class StaticHostBasedAuthenticator

    • Field Detail

      • acceptance

        private final boolean acceptance
    • Constructor Detail

      • StaticHostBasedAuthenticator

        public StaticHostBasedAuthenticator​(boolean acceptance)
    • Method Detail

      • isAccepted

        public final boolean isAccepted()
      • authenticate

        public final boolean authenticate​(ServerSession session,
                                          java.lang.String username,
                                          java.security.PublicKey clientHostKey,
                                          java.lang.String clientHostName,
                                          java.lang.String clientUsername,
                                          java.util.List<java.security.cert.X509Certificate> certificates)
        Specified by:
        authenticate in interface HostBasedAuthenticator
        Parameters:
        session - The ServerSession through which the request was received
        username - The username attempting to login
        clientHostKey - The remote client's host PublicKey
        clientHostName - The reported remote client's host name
        clientUsername - The remote client username
        certificates - Associated X509Certificates - may be null/empty
        Returns:
        true whether authentication is allowed to proceed
      • handleAcceptance

        protected void handleAcceptance​(ServerSession session,
                                        java.lang.String username,
                                        java.security.PublicKey clientHostKey,
                                        java.lang.String clientHostName,
                                        java.lang.String clientUsername,
                                        java.util.List<java.security.cert.X509Certificate> certificates)
      • handleRejection

        protected void handleRejection​(ServerSession session,
                                       java.lang.String username,
                                       java.security.PublicKey clientHostKey,
                                       java.lang.String clientHostName,
                                       java.lang.String clientUsername,
                                       java.util.List<java.security.cert.X509Certificate> certificates)