PHP Class JsConnectPlugin, addons

Inheritance: extends Gdn_Plugin
Mostrar archivo Open project: vanilla/addons Class Usage Examples

Public Methods

Method Description
addControl ( string $key, array $item ) Add an element to the controls collection. Used to render settings forms.
allConnectButtons ( array $Options = [] ) : string
authenticationProviderModel_calculateJsConnect_handler ( AuthenticationProviderModel $sender, array $args ) Calculate the final sign in and register urls for jsConnect.
base_beforeSignInButton_handler ( Gdn_Controller $Sender, $Args )
base_beforeSignInLink_handler ( Gdn_Controller $Sender )
base_connectData_handler ( EntryController $Sender, array $Args )
base_getAppSettingsMenuItems_handler ( Gdn_Controller $Sender )
base_render_before ( Gdn_Controller $Sender, $Args )
connectButton ( $Provider, array $Options = [] ) : string
connectUrl ( $Provider, boolean $Secure = false, boolean $Callback = true ) : boolean | string
entryController_jsConnect_create ( EntryController $Sender, string $Action = '', string $Target = '' ) An intermediate page for jsConnect that checks SSO against and then posts the information to /entry/connect.
entryController_signIn_handler ( Gdn_Controller $Sender, $Args )
getAllProviders ( ) : array | mixed Convenience method for functional clarity.
getProvider ( null $client_id = null ) : array | mixed
getRegisterUrl ( array | integer $provider, string | null $target = null ) : string Gets the full sign in url with the jsConnect redirect added.
getSignInUrl ( arrat | integer $provider, string | null $target = null ) : string Gets the full sign in url with the jsConnect redirect added.
profileController_jsConnect_create ( Gdn_Controller $Sender, array $Args = [] )
rootController_sso_handler ( RootController $Sender, $Args )
settingsController_jsConnect_create ( SettingsController $Sender, array $Args = [] )
settings_delete ( $Sender, $Args )

Protected Methods

Method Description
connectQueryString ( $provider, null $target = null ) : array
settings_addEdit ( SettingsController $sender, array $Args )
settings_index ( $Sender, $Args )

Method Details

addControl() public method

Add an element to the controls collection. Used to render settings forms.
public addControl ( string $key, array $item )
$key string
$item array

allConnectButtons() public static method

public static allConnectButtons ( array $Options = [] ) : string
$Options array
return string

authenticationProviderModel_calculateJsConnect_handler() public method

Calculate the final sign in and register urls for jsConnect.
public authenticationProviderModel_calculateJsConnect_handler ( AuthenticationProviderModel $sender, array $args )
$sender AuthenticationProviderModel Not used.
$args array Contains the provider and

base_beforeSignInButton_handler() public method

public base_beforeSignInButton_handler ( Gdn_Controller $Sender, $Args )
$Sender Gdn_Controller
$Args

base_connectData_handler() public method

public base_connectData_handler ( EntryController $Sender, array $Args )
$Sender EntryController
$Args array

base_getAppSettingsMenuItems_handler() public method

public base_getAppSettingsMenuItems_handler ( Gdn_Controller $Sender )
$Sender Gdn_Controller

base_render_before() public method

public base_render_before ( Gdn_Controller $Sender, $Args )
$Sender Gdn_Controller
$Args

connectButton() public static method

public static connectButton ( $Provider, array $Options = [] ) : string
$Provider
$Options array
return string

connectQueryString() protected static method

protected static connectQueryString ( $provider, null $target = null ) : array
$provider
$target null
return array

connectUrl() public static method

public static connectUrl ( $Provider, boolean $Secure = false, boolean $Callback = true ) : boolean | string
$Provider
$Secure boolean
$Callback boolean
return boolean | string

entryController_jsConnect_create() public method

An intermediate page for jsConnect that checks SSO against and then posts the information to /entry/connect.
public entryController_jsConnect_create ( EntryController $Sender, string $Action = '', string $Target = '' )
$Sender EntryController
$Action string A specific action. It can be one of the following: - blank: The default action. - guest: There is no user signed in. -
$Target string The url to redirect to after a successful connect.

entryController_signIn_handler() public method

public entryController_signIn_handler ( Gdn_Controller $Sender, $Args )
$Sender Gdn_Controller

getAllProviders() public static method

Convenience method for functional clarity.
public static getAllProviders ( ) : array | mixed
return array | mixed

getProvider() public static method

public static getProvider ( null $client_id = null ) : array | mixed
$client_id null
return array | mixed

getRegisterUrl() public static method

Gets the full sign in url with the jsConnect redirect added.
public static getRegisterUrl ( array | integer $provider, string | null $target = null ) : string
$provider array | integer The authentication provider or its ID.
$target string | null The url to redirect to after signing in or null to guess the target.
return string Returns the sign in url.

getSignInUrl() public static method

Gets the full sign in url with the jsConnect redirect added.
public static getSignInUrl ( arrat | integer $provider, string | null $target = null ) : string
$provider arrat | integer The authentication provider or its ID.
$target string | null The url to redirect to after signing in or null to guess the target.
return string Returns the sign in url.

profileController_jsConnect_create() public method

public profileController_jsConnect_create ( Gdn_Controller $Sender, array $Args = [] )
$Sender Gdn_Controller
$Args array

rootController_sso_handler() public method

public rootController_sso_handler ( RootController $Sender, $Args )
$Sender RootController
$Args

settingsController_jsConnect_create() public method

public settingsController_jsConnect_create ( SettingsController $Sender, array $Args = [] )
$Sender SettingsController
$Args array

settings_addEdit() protected method

protected settings_addEdit ( SettingsController $sender, array $Args )
$sender SettingsController
$Args array

settings_delete() public method

public settings_delete ( $Sender, $Args )
$Sender
$Args

settings_index() protected method

protected settings_index ( $Sender, $Args )
$Sender
$Args