Class DummyUserService

java.lang.Object
io.openems.edge.common.test.DummyUserService
All Implemented Interfaces:
UserService

public class DummyUserService extends Object implements UserService
Simulates a UserService for the OpenEMS Component test framework.
  • Constructor Details

    • DummyUserService

      public DummyUserService(DummyUser... users)
  • Method Details

    • authenticate

      public Optional<User> authenticate(String password)
      Description copied from interface: UserService
      Authenticates a user with his password.
      Specified by:
      authenticate in interface UserService
      Parameters:
      password - the password
      Returns:
      the authenticated User or Empty if authentication failed
    • authenticate

      public Optional<User> authenticate(String username, String password)
      Description copied from interface: UserService
      Authenticates a user with his username and password.
      Specified by:
      authenticate in interface UserService
      Parameters:
      username - the username
      password - the password
      Returns:
      the authenticated User or Empty if authentication failed