Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 11 additions & 42 deletions src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,48 +89,6 @@ public function authenticate(array $credentials)
return $response;
}

public function check(array $credentials): bool
{
return $this->authenticate
->factory($this->handler)
->check($credentials);
}

public function loggedIn(): bool
{
return $this->authenticate
->factory($this->handler)
->loggedIn();
}

public function login(User $user)
{
return $this->authenticate
->factory($this->handler)
->login($user);
}

public function loginById(int $userId)
{
return $this->authenticate
->factory($this->handler)
->loginById($userId);
}

public function logout()
{
return $this->authenticate
->factory($this->handler)
->logout();
}

public function forget()
{
return $this->authenticate
->factory($this->handler)
->forget();
}

public function routes(array $config = null)
{
}
Expand Down Expand Up @@ -158,4 +116,15 @@ public function getProvider()

return $this->userProvider;
}

/**
* Dynamically call the handler instance.
*
* @param string $method
* @param array $arguments
*/
public function __call($method, $arguments)
{
return $this->authenticate->factory($this->handler)->{$method}(...$arguments);
}
}