Class RemoteAccessServer.CredentialsManager
java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.ssh.RemoteAccessServer.CredentialsManager
- Enclosing class:
RemoteAccessServer
A CredentialsManager stores credentials for the underlying ssh server.
- Author:
- Dennis Pidun, University of Hildesheim
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCredentials(de.iip_ecosphere.platform.deviceMgt.Credentials credentials) Adds credentails to the credentials manager.de.iip_ecosphere.platform.deviceMgt.CredentialsAdd and generate some credentials.booleanauthenticate(String key, String secret) Checks if the given key and secret combination is stored in the credentials list.List<de.iip_ecosphere.platform.deviceMgt.Credentials> Gets all currently saved credentials.de.iip_ecosphere.platform.deviceMgt.CredentialsgetCredentials(String key) Get specific credentials for a key.
-
Field Details
-
credentials
-
-
Constructor Details
-
CredentialsManager
public CredentialsManager()
-
-
Method Details
-
getCredentials
Gets all currently saved credentials.- Returns:
- the credentials list.
-
getCredentials
Get specific credentials for a key.- Parameters:
key- the key- Returns:
- the credentials
-
authenticate
Checks if the given key and secret combination is stored in the credentials list.- Parameters:
key- the keysecret- 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
-