Class StaticHostBasedAuthenticator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean acceptance  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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)  
      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)  
      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)  
      boolean isAccepted()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)