PHP Class App\Http\Controllers\API\LastfmController

Inheritance: extends Controller
Show file Open project: phanan/koel

Protected Properties

Property Type Description
$auth * The Guard implementation.

Public Methods

Method Description
__construct ( Illuminate\Contracts\Auth\Guard $auth ) Construct the controller and inject the current auth.
callback ( Illuminate\Http\Request $request, Lastfm $lastfm ) : Illuminate\Http\Response Serve the callback request from Last.fm.
connect ( Redirector $redirector, Lastfm $lastfm, Tymon\JWTAuth\JWTAuth $auth = null ) : Redirector | Illuminate\Http\RedirectResponse Connect the current user to Last.fm.
disconnect ( ) : Illuminate\Http\JsonResponse Disconnect the current user from Last.fm.
setSessionKey ( Illuminate\Http\Request $request ) : Illuminate\Http\JsonResponse Set the Last.fm session key of the current user.

Method Details

__construct() public method

Construct the controller and inject the current auth.
public __construct ( Illuminate\Contracts\Auth\Guard $auth )
$auth Illuminate\Contracts\Auth\Guard

callback() public method

Serve the callback request from Last.fm.
public callback ( Illuminate\Http\Request $request, Lastfm $lastfm ) : Illuminate\Http\Response
$request Illuminate\Http\Request
$lastfm App\services\Lastfm
return Illuminate\Http\Response

connect() public method

Connect the current user to Last.fm.
public connect ( Redirector $redirector, Lastfm $lastfm, Tymon\JWTAuth\JWTAuth $auth = null ) : Redirector | Illuminate\Http\RedirectResponse
$redirector Illuminate\Routing\Redirector
$lastfm App\services\Lastfm
$auth Tymon\JWTAuth\JWTAuth
return Illuminate\Routing\Redirector | Illuminate\Http\RedirectResponse

disconnect() public method

Disconnect the current user from Last.fm.
public disconnect ( ) : Illuminate\Http\JsonResponse
return Illuminate\Http\JsonResponse

setSessionKey() public method

Set the Last.fm session key of the current user.
public setSessionKey ( Illuminate\Http\Request $request ) : Illuminate\Http\JsonResponse
$request Illuminate\Http\Request
return Illuminate\Http\JsonResponse

Property Details

$auth protected property

* The Guard implementation.
protected $auth