\OpauthController
OpauthController Wraps around Opauth for handling callbacks.
The SS equivalent of "index.php" and "callback.php" in the Opauth package.
- Author: Will Morgan <@willmorgan>
- Copyright: Copyright (c) 2013, Better Brief LLP
Synopsis
class OpauthController
extends ContentController
{
- // constants
- const AUTH_FLAG_LOGIN = 2;
- // members
- private static array $allowed_actions = ;
- protected $registerForm;
- // methods
- public void __construct()
- public void index()
- protected void oauthCallback()
- public void finished()
- protected void loginAndRedirect()
- public void profilecompletion()
- public void RegisterForm()
- public void doCompleteRegister()
- protected array getOpauthResponse()
- protected void validateOpauthResponse()
- protected void requireResponseComponents()
- protected array getResponseFromSession()
- protected void handleOpauthException()
- protected array getResponseFromRequest()
- public void Link()
- public static string get_path()
- public static string get_callback_path()
- public void Title()
- public void Form()
Hierarchy
Extends
- ContentController
Tasks
Line | Task |
---|---|
61+ | : Validate the strategy works before delegating to Opauth. |
317 | improve this signature check. it's a bit weak. |
Constants
Name | Value |
---|---|
AUTH_FLAG_LOGIN | 2 |
Members
private
- $allowed_actions
protected
- $registerForm
Methods
protected
- getOpauthResponse() — Returns the response from the Oauth callback.
- getResponseFromRequest() — Looks at $method (GET, POST, PUT etc) for the response.
- getResponseFromSession()
- handleOpauthException()
- loginAndRedirect()
- oauthCallback() — This is executed when the Oauth provider redirects back to us Opauth handles everything sent back in this request.
- requireResponseComponents() — Shorthand for quickly finding missing components and complaining about it
- validateOpauthResponse() — Validates the Oauth response for Opauth.
public
- __construct() — Fake a Page_Controller by using that class as a failover
- Form()
- Link()
- RegisterForm()
- Title()
- doCompleteRegister()
- finished() — Equivalent to "callback.php" in the Opauth package.
- get_callback_path() — 'callback_url' param for use in Opauth's config MUST have trailling slash for Opauth needs
- get_path() — 'path' param for use in Opauth's config MUST have trailling slash for Opauth needs
- index() — This function only catches the request to pass it straight on.
- profilecompletion()