class Controller extends GenericOauth2TypeController (View source)

Traits

Trait LoggerAwareTrait A trait used with LoggerAwareInterface

LoggerAwareTrait

Properties

protected $authenticationType from  AuthenticationTypeController
protected $app from  AuthenticationTypeController
$apiMethods from  GenericOauthTypeController
protected AbstractService $service from  GenericOauth2TypeController
protected Extractor $extractor from  GenericOauthTypeController
protected TokenInterface $token from  GenericOauthTypeController
protected $username from  GenericOauthTypeController
protected $email from  GenericOauthTypeController
protected $firstName from  GenericOauthTypeController
protected $lastName from  GenericOauthTypeController
protected $fullName from  GenericOauthTypeController
protected BindingService|null $bindingService from  GenericOauthTypeController
protected ServiceFactory $factory
protected ResolverManagerInterface $urlResolver
protected Repository $config

Methods

string
getLoggerChannel()

Get the logger channel expected by this LoggerAwareTrait implementation The user is expected to declare this method and return a valid channel name.

getAuthenticationTypeIconHTML()

Build and return this authentication type's icon HTML.

view()

No description

__construct(AuthenticationType $type = null, ServiceFactory $factory, ResolverManagerInterface $urlResolver, Repository $config)

No description

completeAuthentication(User $u)

tasks to finalize authentication, call on login events etc.

string
getHandle()

No description

handle_error($error = false)

No description

showError($error = null)

No description

markError($error)

No description

handle_success($message = false)

No description

showSuccess($message = null)

No description

markSuccess($message)

No description

User|null
authenticate()

Empty because we don't use the authenticate entry point.

string
buildHash(User $u)

Create a cookie hash to identify the user indefinitely.

bool
verifyHash(User $u, string $hash)

Hash authentication disabled for oauth.

TokenInterface
getToken()

No description

setToken(TokenInterface $token)

No description

null|User
attemptAuthentication()

We now check if the user allows access to email address as twitter does not provide this and users can deny access to on facebook).

handle_register($token = null)

No description

ExtractorInterface
getExtractor($new = false)

No description

form()

Controller method for form This method is called just before form.php is rendered, use it to set data for that template.

AbstractService
getService()

Get the service object associated with this authentication type This method uses the oauth/factory/service object to create our service if one is not set.

isValid()

No description

int|bool
getBoundUserID($binding)

No description

bool
supportsRegistration()

Determine whether this type supports automatically registering users This method grabs this configuration from the auth config group.

bool
registrationGroupID()

Get the ID of the group to enter upon registration This method grabs the registration group ID out of the auth config group.

createUser()

No description

getEmail()

No description

getFirstName()

No description

getLastName()

No description

getFullName()

No description

getUsername()

No description

int|null
bindUser(User $user, $binding)

No description

int|null
bindUserID($user_id, $binding)

No description

string|null
getBindingForUser(User|UserInfo|User|int $user)

Get the binding associated to a specific user.

getUniqueId()

No description

deauthenticate(User $u)

Method used to clean up.

bool
isAuthenticated(User $u)

Test user authentication status.

saveAuthenticationType(array|Traversable $args)

Save data for this authentication type This method is called when the type_form.php submits. It stores client details and configuration for connecting.

edit()

Controller method for type_form This method is called just before rendering type_form.php, use it to set data for that template.

hook()

Controller method for the hook template This method is called before hook.php is rendered, use it to set data for that template.

hooked()

Controller method for the hooked template This method gets called before hooked.php is rendered, use it to set data for that template.

setData()

Method for setting general data for all views.

Details

abstract string getLoggerChannel()

Get the logger channel expected by this LoggerAwareTrait implementation The user is expected to declare this method and return a valid channel name.

Return Value

string

One of \Concrete\Core\Logging\Channels::CHANNEL_*

getAuthenticationTypeIconHTML()

Build and return this authentication type's icon HTML.

view()

No description

__construct(AuthenticationType $type = null, ServiceFactory $factory, ResolverManagerInterface $urlResolver, Repository $config)

No description

Parameters

AuthenticationType $type

This type may be null only for access points that do not rely on the type.

ServiceFactory $factory
ResolverManagerInterface $urlResolver
Repository $config

getAuthenticationType()

No description

completeAuthentication(User $u)

tasks to finalize authentication, call on login events etc.

Parameters

User $u

string getHandle()

No description

Return Value

string

array getAdditionalRequestParameters()

No description

Return Value

array

handle_error($error = false)

No description

Parameters

$error

showError($error = null)

No description

Parameters

$error

markError($error)

No description

Parameters

$error

handle_success($message = false)

No description

Parameters

$message

showSuccess($message = null)

No description

Parameters

$message

markSuccess($message)

No description

Parameters

$message

User|null authenticate()

Empty because we don't use the authenticate entry point.

Return Value

User|null

string buildHash(User $u)

Create a cookie hash to identify the user indefinitely.

Parameters

User $u

Return Value

string

Unique hash to be used to verify the users identity

bool verifyHash(User $u, string $hash)

Hash authentication disabled for oauth.

Parameters

User $u

User object requesting verification.

string $hash

Return Value

bool

returns true if the hash is valid, false if not

TokenInterface getToken()

No description

Return Value

TokenInterface

setToken(TokenInterface $token)

No description

Parameters

TokenInterface $token

protected null|User attemptAuthentication()

We now check if the user allows access to email address as twitter does not provide this and users can deny access to on facebook).

Return Value

null|User

Exceptions

Exception

handle_register($token = null)

No description

Parameters

$token

ExtractorInterface getExtractor($new = false)

No description

Parameters

$new

Return Value

ExtractorInterface

Exceptions

UndefinedExtractorException

form()

Controller method for form This method is called just before form.php is rendered, use it to set data for that template.

AbstractService getService()

Get the service object associated with this authentication type This method uses the oauth/factory/service object to create our service if one is not set.

Return Value

AbstractService

protected isValid()

No description

int|bool getBoundUserID($binding)

No description

Parameters

$binding

Return Value

int|bool

False if no user id is bound

Exceptions

DBALException

bool supportsRegistration()

Determine whether this type supports automatically registering users This method grabs this configuration from the auth config group.

Return Value

bool

bool registrationGroupID()

Get the ID of the group to enter upon registration This method grabs the registration group ID out of the auth config group.

Return Value

bool

protected createUser()

No description

supportsEmail()

No description

supportsUniqueId()

No description

supportsVerifiedEmail()

No description

isEmailVerified()

No description

getEmail()

No description

supportsFullName()

No description

supportsFirstName()

No description

supportsLastName()

No description

getFirstName()

No description

getLastName()

No description

getFullName()

No description

supportsUsername()

No description

getUsername()

No description

int|null bindUser(User $user, $binding)

No description

Parameters

User $user
$binding

Return Value

int|null

int|null bindUserID($user_id, $binding)

No description

Parameters

$user_id
$binding

Return Value

int|null

string|null getBindingForUser(User|UserInfo|User|int $user)

Get the binding associated to a specific user.

Parameters

User|UserInfo|User|int $user

Return Value

string|null

getUniqueId()

No description

handle_authentication_attempt()

No description

handle_authentication_callback()

No description

handle_attach_attempt()

No description

handle_attach_callback()

No description

handle_detach_attempt()

No description

protected BindingService getBindingService()

No description

Return Value

BindingService

deauthenticate(User $u)

Method used to clean up.

This method must be defined, if it isn't needed, leave it blank.

Parameters

User $u

bool isAuthenticated(User $u)

Test user authentication status.

Parameters

User $u

Return Value

bool

Returns true if user is authenticated, false if not

saveAuthenticationType(array|Traversable $args)

Save data for this authentication type This method is called when the type_form.php submits. It stores client details and configuration for connecting.

Parameters

array|Traversable $args

edit()

Controller method for type_form This method is called just before rendering type_form.php, use it to set data for that template.

hook()

Controller method for the hook template This method is called before hook.php is rendered, use it to set data for that template.

hooked()

Controller method for the hooked template This method gets called before hooked.php is rendered, use it to set data for that template.

private setData()

Method for setting general data for all views.