Class UserServiceImpl

  • All Implemented Interfaces:
    UserService

    public class UserServiceImpl
    extends java.lang.Object
    implements UserService
    This component handles User authentication.
    • Constructor Summary

      Constructors 
      Constructor Description
      UserServiceImpl()  
    • 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

      • UserServiceImpl

        public UserServiceImpl()
    • Method Detail

      • authenticate

        public final 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
      • authenticate

        public final 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