def authenticate(self, brl_user, password):
        try:
            brl_user = BRLUser(brl_user)
        except InvalidNameException:
            raise AuthenticationException("Wrong user or password")
        self._check_password(brl_user, password)
        manager = JWTCredentialsManagerFactory.new(self.store)
        token = manager.get_token_for(brl_user)
        return brl_user, token
Create a "profile" object (object to encrypt) and expiration time.
dataset/ETHPy150Open biicode/bii-server/user/user_service.py/UserService.authenticate