Class RemoteAccessServer.CredentialsManager

java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.ssh.RemoteAccessServer.CredentialsManager
Enclosing class:
RemoteAccessServer

public class RemoteAccessServer.CredentialsManager extends Object
A CredentialsManager stores credentials for the underlying ssh server.
Author:
Dennis Pidun, University of Hildesheim
  • Field Details

    • credentials

      private List<de.iip_ecosphere.platform.deviceMgt.Credentials> credentials
  • Constructor Details

    • CredentialsManager

      public CredentialsManager()
  • Method Details

    • getCredentials

      public List<de.iip_ecosphere.platform.deviceMgt.Credentials> getCredentials()
      Gets all currently saved credentials.
      Returns:
      the credentials list.
    • getCredentials

      public de.iip_ecosphere.platform.deviceMgt.Credentials getCredentials(String key)
      Get specific credentials for a key.
      Parameters:
      key - the key
      Returns:
      the credentials
    • authenticate

      public boolean authenticate(String key, String secret)
      Checks if the given key and secret combination is stored in the credentials list.
      Parameters:
      key - the key
      secret - the secret
      Returns:
      true if the credentials are right
    • addCredentials

      public void addCredentials(de.iip_ecosphere.platform.deviceMgt.Credentials credentials)
      Adds credentails to the credentials manager.
      Parameters:
      credentials - the credentials
    • addGeneratedCredentials

      public de.iip_ecosphere.platform.deviceMgt.Credentials addGeneratedCredentials()
      Add and generate some credentials. The key and secret is exactly 16 characters long
      Returns:
      the generated credentials