Class NTLMPassthruToken

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal, net.sf.acegisecurity.Authentication

    public class NTLMPassthruToken
    extends NTLMLocalToken

    Used to provide passthru authentication to a remote Windows server using multiple stages that allows authentication details to be passed between a client and the remote authenticating server without the password being known by the authentication provider.

    Author:
    GKSpencer
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Check for object equality
      long getAuthenticationExpireTime()
      Return the authentication expiry time, this will be zero if the authentication session has not yet been opened to the server
      NTLMChallenge getChallenge()
      Return the challenge
      byte[] getHashedPassword()
      Return the hashed password
      int getPasswordType()
      Return the hashed password type
      java.lang.Object getPrincipal()
      Return the user account
      protected void setAuthenticationExpireTime​(long expireTime)
      Set the authentication expire time, this indicates that an authentication session is associated with this token and the session will be closed if the authentication is not completed by this time.
      protected void setChallenge​(NTLMChallenge challenge)
      Set the challenge for this token
      void setUserAndPassword​(java.lang.String username, byte[] hashedPassword, int hashType)
      Set the hashed password and type
      • Methods inherited from class net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken

        getAuthorities, getCredentials, getDetails, isAuthenticated, setAuthenticated, setAuthorities, setDetails
      • Methods inherited from class net.sf.acegisecurity.providers.AbstractAuthenticationToken

        getName, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        hashCode, implies
    • Constructor Detail

      • NTLMPassthruToken

        public NTLMPassthruToken()
        Class constructor
      • NTLMPassthruToken

        public NTLMPassthruToken​(java.lang.String domain)
        Class constructor
        Parameters:
        domain - String
      • NTLMPassthruToken

        public NTLMPassthruToken​(java.net.InetAddress ipAddr)
        Class constructor
        Parameters:
        ipAddr - InetAddress
    • Method Detail

      • getChallenge

        public final NTLMChallenge getChallenge()
        Return the challenge
        Returns:
        NTLMChallenge
      • getPrincipal

        public final java.lang.Object getPrincipal()
        Return the user account
        Specified by:
        getPrincipal in interface net.sf.acegisecurity.Authentication
        Overrides:
        getPrincipal in class net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken
        Returns:
        Object
      • getHashedPassword

        public final byte[] getHashedPassword()
        Return the hashed password
        Returns:
        byte[]
      • getPasswordType

        public final int getPasswordType()
        Return the hashed password type
        Returns:
        int
      • getAuthenticationExpireTime

        public final long getAuthenticationExpireTime()
        Return the authentication expiry time, this will be zero if the authentication session has not yet been opened to the server
        Returns:
        long
      • setUserAndPassword

        public final void setUserAndPassword​(java.lang.String username,
                                             byte[] hashedPassword,
                                             int hashType)
        Set the hashed password and type
        Parameters:
        hashedPassword - byte[]
        hashType - int
      • setChallenge

        protected final void setChallenge​(NTLMChallenge challenge)
        Set the challenge for this token
        Parameters:
        challenge - NTLMChallenge
      • setAuthenticationExpireTime

        protected final void setAuthenticationExpireTime​(long expireTime)
        Set the authentication expire time, this indicates that an authentication session is associated with this token and the session will be closed if the authentication is not completed by this time.
        Parameters:
        expireTime - long
      • equals

        public boolean equals​(java.lang.Object obj)
        Check for object equality
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class net.sf.acegisecurity.providers.AbstractAuthenticationToken
        Parameters:
        obj - Object
        Returns:
        boolean