Class DummyUserService

  • All Implemented Interfaces:
    UserService

    public class DummyUserService
    extends java.lang.Object
    implements UserService
    Simulates a UserService for the OpenEMS Component test framework.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<User> authenticate​(java.lang.String password)
      Authenticates a user with his password.
      java.util.Optional<User> authenticate​(java.lang.String username, java.lang.String password)
      Authenticates a user with his username and password.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DummyUserService

        public DummyUserService​(DummyUser... users)
    • Method Detail

      • authenticate

        public java.util.Optional<User> authenticate​(java.lang.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 java.util.Optional<User> authenticate​(java.lang.String username,
                                                     java.lang.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