Package org.yamcs.sle

Class Isp1Authentication

java.lang.Object
org.yamcs.sle.Isp1Authentication

public class Isp1Authentication extends Object
  • Constructor Details

    • Isp1Authentication

      public Isp1Authentication(String myUsername, byte[] myPass, String peerUsername, byte[] peerPass, String hashAlgorithm)
  • Method Details

    • generateIsp1Credentials

      public ISP1Credentials generateIsp1Credentials()
    • generateCredentials

      public Credentials generateCredentials()
    • getMaxDeltaRcvTime

      public long getMaxDeltaRcvTime()
    • setMaxDeltaRcvTime

      public void setMaxDeltaRcvTime(long maxDeltaRcvTime)
      Set the maximum delta between local time and received credential time used in the verifyCredentials(Credentials).
      Parameters:
      maxDeltaRcvTime - delta time in milliseconds
    • verifyCredentials

      public void verifyCredentials(Credentials credentials) throws AuthenticationException
      Verify credentials and throw an exception if they are not correct. This method uses System.currentTimeMillis() to get the time in milliseconds and compare it with the received time and maxDeltaRcvTime.
      Parameters:
      credentials - the credentials to be verified
      Throws:
      AuthenticationException - in case the credentials do not match
    • getMyUsername

      public String getMyUsername()
    • debugAuth

      public void debugAuth(boolean debugAuth)
      if set to true, authentication messages containing passwords will be logged at DEBUG level.

      Do not forget to switch off!

      Parameters:
      debugAuth -