MOON
Server: Apache
System: Linux server.royaltuning.hu 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Tue Feb 21 04:20:52 EST 2023 x86_64
User: royaltuning (1001)
PHP: 8.2.32
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //var/www/html/Modules/User/Contracts/Authentication.php
<?php

namespace Modules\User\Contracts;

use Modules\User\Entities\Role;
use Modules\User\Entities\User;

interface Authentication
{
    /**
     * Authenticate a user.
     *
     * @param array $credentials
     * @param bool $remember
     * @return mixed
     */
    public function login($credentials, $remember = false);

    /**
     * Register a new user.
     *
     * @param array $data
     * @return bool
     */
    public function register($data);

    /**
     * Register and activate a new user.
     *
     * @param array $data
     * @return \Modules\User\Entities\User
     */
    public function registerAndActivate($data);

    /**
     * Activate the given used id.
     *
     * @param int $userId
     * @param string $code
     * @return mixed
     */
    public function activate($userId, $code);

    /**
     * Assign a role to the given user.
     *
     * @param \Modules\User\Entities\User $user
     * @param \Modules\User\Entities\Role $role
     * @return void
     */
    public function assignRole(User $user, Role $role);

    /**
     * Log the user out of the application.
     *
     * @return bool
     */
    public function logout();

    /**
     * Create an activation code for the given user.
     *
     * @param \Modules\User\Entities\User $user
     * @return \Cartalyst\Sentinel\Activations\ActivationInterface
     */
    public function createActivation(User $user);

    /**
     * Create a reminders code for the given user.
     *
     * @param \Modules\User\Entities\User $user
     * @return string
     */
    public function createReminderCode(User $user);

    /**
     * Completes the reset password process.
     *
     * @param \Modules\User\Entities\User $user
     * @param string $code
     * @param string $password
     * @return bool
     */
    public function completeResetPassword(User $user, $code, $password);

    /**
     * Determines if the current user has access to the given permissions.
     *
     * @param array|string $permissions
     * @return bool
     */
    public function hasAccess($permissions);

    /**
     * Determine if the user has access to the any given permissions
     *
     * @param array|string $permissions
     * @return bool
     */
    public function hasAnyAccess($permissions);

    /**
     * Check if the user is logged in.
     *
     * @return bool
     */
    public function check();

    /**
     * Get the currently logged in user.
     *
     * @return \Modules\User\Entities\User
     */
    public function user();

    /**
     * Get the ID for the currently authenticated user.
     *
     * @return int|null
     */
    public function id();
}