PHP Class Learner\Http\Controllers\Auth\SocialController

Inheritance: extends Learner\Http\Controllers\BaseController
ファイルを表示 Open project: RryLee/learner.video

Public Methods

Method Description
__construct ( ) Only guest can access this controller.
handleGithubOAuth ( ) : Response Obtain the user information from GitHub.
handleTwitterOAuth ( ) : Response Obtain the user information from GitHub.
redirectToGithub ( ) : Response Redirect the user to the GitHub authentication page.
redirectToTwitter ( ) : Response Redirect the user to the GitHub authentication page.

Protected Methods

Method Description
createAUser ( ) : User Create a new user.

Private Methods

Method Description
findOrCreateUser ( $githubUser ) : User | array Return user if exists; create and return if doesn't

Method Details

__construct() public method

Only guest can access this controller.
public __construct ( )

createAUser() protected method

Create a new user.
protected createAUser ( ) : User
return Learner\Models\User

handleGithubOAuth() public method

Obtain the user information from GitHub.
public handleGithubOAuth ( ) : Response
return Response

handleTwitterOAuth() public method

Obtain the user information from GitHub.
public handleTwitterOAuth ( ) : Response
return Response

redirectToGithub() public method

Redirect the user to the GitHub authentication page.
public redirectToGithub ( ) : Response
return Response

redirectToTwitter() public method

Redirect the user to the GitHub authentication page.
public redirectToTwitter ( ) : Response
return Response