arguments) ) { throw new \RuntimeException("Base64 decoding of given username:password failed"); } list($userName, $password) = explode(':', $decoded) + [ null, null ]; if ( empty($userName) ) { throw new \RuntimeException("A username must be provided"); } elseif ( empty($password) ) { throw new \RuntimeException("A password must be provided"); } ( new Authorize($this->user) )->authenticate([ $this->user->usernameField() => $userName ], $password); return $this->user->loggedIn(); } }