Cartalyst\Sentinel\Sentinel::basic PHP Method

basic() public method

Attempt to authenticate using HTTP Basic Auth.
public basic ( ) : mixed
return mixed
    public function basic()
    {
        $credentials = $this->getRequestCredentials();
        // We don't really want to add a throttling record for the
        // first failed login attempt, which actually occurs when
        // the user first hits a protected route.
        if ($credentials === null) {
            return $this->getBasicResponse();
        }
        $user = $this->stateless($credentials);
        if ($user) {
            return;
        }
        return $this->getBasicResponse();
    }

Usage Example

Esempio n. 1
0
 /**
  * Attempt to authenticate using HTTP Basic Auth.
  *
  * @return mixed
  */
 public function basic()
 {
     return $this->sentinel->basic();
 }
All Usage Examples Of Cartalyst\Sentinel\Sentinel::basic