@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | /** |
94 | 94 | * Switch to another user. |
95 | 95 | * |
96 | - * @param string|UserInterface $id user id of the user to switch to. |
|
96 | + * @param string $id user id of the user to switch to. |
|
97 | 97 | * @param array $params Additional parameters to store in the session container. |
98 | 98 | * |
99 | 99 | * @return bool |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param string $key |
168 | 168 | * @param mixed $default Value to return if param $key is not set. |
169 | 169 | * |
170 | - * @return null |
|
170 | + * @return string |
|
171 | 171 | */ |
172 | 172 | public function getSessionParam($key, $default = null) |
173 | 173 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @param string $requestedName |
26 | 26 | * @param null|array $options |
27 | 27 | * |
28 | - * @return object |
|
28 | + * @return CheckPermissionsListener |
|
29 | 29 | * @throws ServiceNotFoundException if unable to resolve the service. |
30 | 30 | * @throws ServiceNotCreatedException if an exception is raised when |
31 | 31 | * creating a service. |
@@ -47,7 +47,6 @@ discard block |
||
47 | 47 | * |
48 | 48 | * - Injects the AuthenticationService |
49 | 49 | * |
50 | - * @param ServiceLocatorInterface $helpers |
|
51 | 50 | * @return \Auth\View\Helper\Auth |
52 | 51 | * @see \Zend\ServiceManager\FactoryInterface::createService() |
53 | 52 | */ |
@@ -48,7 +48,7 @@ |
||
48 | 48 | break; |
49 | 49 | } |
50 | 50 | |
51 | - $config = $container->get('Config'); |
|
51 | + $config = $container->get('Config'); |
|
52 | 52 | |
53 | 53 | if (isset($config['view_manager'])) { |
54 | 54 | if (isset($config['view_manager']['display_exceptions'])) { |
@@ -97,8 +97,8 @@ |
||
97 | 97 | $value = null; |
98 | 98 | $service = $this->getService(); |
99 | 99 | $user = $service->getUser(); |
100 | - if (method_exists($user,"get".$property)) { |
|
101 | - $value = $user->{"get" . $property}(); |
|
100 | + if (method_exists($user, "get".$property)) { |
|
101 | + $value = $user->{"get".$property}(); |
|
102 | 102 | } |
103 | 103 | return $value; |
104 | 104 | } catch (\OutOfBoundsException $e) { |
@@ -92,7 +92,7 @@ |
||
92 | 92 | } |
93 | 93 | return $value; |
94 | 94 | } |
95 | - return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get' . $property}(); |
|
95 | + return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get'.$property}(); |
|
96 | 96 | } |
97 | 97 | return null; |
98 | 98 | } |
@@ -99,7 +99,6 @@ |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * @param ControllerManager $controllerManager |
|
103 | 102 | * @return \Auth\Controller\Plugin\Auth |
104 | 103 | */ |
105 | 104 | public static function factory(ServiceManager $sm) |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | public static function factory(ServiceManager $sm) |
106 | 106 | { |
107 | - //$manager = $sm->get('ControllerManager'); |
|
107 | + //$manager = $sm->get('ControllerManager'); |
|
108 | 108 | return new static($sm->get('AuthenticationService')); |
109 | 109 | } |
110 | 110 | } |
@@ -69,6 +69,9 @@ |
||
69 | 69 | return $this; |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $network |
|
74 | + */ |
|
72 | 75 | public function getAdapter($network) |
73 | 76 | { |
74 | 77 | if (isset($this->adapters[$network])) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | class SocialProfiles extends AbstractPlugin |
18 | 18 | { |
19 | - protected $hybridAuth; |
|
19 | + protected $hybridAuth; |
|
20 | 20 | |
21 | 21 | protected $adapterMap = array( |
22 | 22 | 'facebook' => '\\Auth\\Controller\\Plugin\\SocialProfiles\\Facebook', |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | |
26 | 26 | ); |
27 | 27 | |
28 | - /** |
|
29 | - * @var RequestInterface |
|
30 | - */ |
|
28 | + /** |
|
29 | + * @var RequestInterface |
|
30 | + */ |
|
31 | 31 | protected $request; |
32 | 32 | |
33 | 33 | public function __construct($hybridAuth,RequestInterface $request,array $adapters = array()) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | protected $request; |
32 | 32 | |
33 | - public function __construct($hybridAuth,RequestInterface $request,array $adapters = array()) |
|
33 | + public function __construct($hybridAuth, RequestInterface $request, array $adapters = array()) |
|
34 | 34 | { |
35 | 35 | $this->hybridAuth = $hybridAuth; |
36 | 36 | $this->request = $request; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | throw new \InvalidArgumentException( |
71 | 71 | sprintf( |
72 | 72 | 'Adapter must be either a string or an instance of \Auth\Controller\Plugin\SocialProfiles\AbstractAdapter, but received %s', |
73 | - is_object($adapter) ? get_class($adapter) : '(' . gettype($adapter) . ')' |
|
73 | + is_object($adapter) ? get_class($adapter) : '('.gettype($adapter).')' |
|
74 | 74 | ) |
75 | 75 | ); |
76 | 76 | } |
@@ -29,7 +29,6 @@ |
||
29 | 29 | {} |
30 | 30 | |
31 | 31 | /** |
32 | - * @param string $network |
|
33 | 32 | * @return \Auth\Entity\SocialProfiles\ProfileInterface|bool |
34 | 33 | */ |
35 | 34 | public function fetch($api) |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function fetch($api) |
36 | 36 | { |
37 | - $result = $this->queryApi($api); |
|
37 | + $result = $this->queryApi($api); |
|
38 | 38 | if (!$result) { |
39 | 39 | return false; |
40 | 40 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $class = get_class($this); |
61 | 61 | $class = explode('\\', $class); |
62 | 62 | $class = array_pop($class); |
63 | - $class = '\\Auth\\Entity\\SocialProfiles\\' . $class; |
|
63 | + $class = '\\Auth\\Entity\\SocialProfiles\\'.$class; |
|
64 | 64 | |
65 | 65 | return $class; |
66 | 66 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | $identity = $this->getIdentity(); |
118 | - $applicationId = '@' . $this->getApplicationIdentifier(); |
|
118 | + $applicationId = '@'.$this->getApplicationIdentifier(); |
|
119 | 119 | $applicationIdIndex = strrpos($identity, $applicationId); |
120 | 120 | //$login = (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex)?substr($identity, 0, $applicationIdIndex):$identity; |
121 | 121 | $login = $identity; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | $loginSuccess = false; |
129 | 129 | $loginResult = array(); |
130 | 130 | |
131 | - if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
132 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with correct suffix: '); |
|
131 | + if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
132 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with correct suffix: '); |
|
133 | 133 | // the login ends with the applicationID, therefore use the secret key |
134 | 134 | // the external login must be the form 'xxxxx@yyyy' where yyyy is the matching suffix to the external application key |
135 | 135 | if (isset($user)) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $loginSuccess = true; |
138 | 138 | } else { |
139 | 139 | $loginSuccess = false; |
140 | - $this->serviceManager->get('Core/Log')->info('User ' . $login . ', secret: ' . $user->getSecret() . ' != loginPassword: ' . $filter->filter($credential) . ' (' . $credential . ')'); |
|
140 | + $this->serviceManager->get('Core/Log')->info('User '.$login.', secret: '.$user->getSecret().' != loginPassword: '.$filter->filter($credential).' ('.$credential.')'); |
|
141 | 141 | } |
142 | 142 | } else { |
143 | 143 | $user = $users->create( |
@@ -153,17 +153,17 @@ discard block |
||
153 | 153 | $loginResult = array('firstLogin' => true); |
154 | 154 | } |
155 | 155 | } elseif (isset($user)) { |
156 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with incorrect suffix: '); |
|
156 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with incorrect suffix: '); |
|
157 | 157 | if ($user->getCredential() == $filter->filter($credential)) { |
158 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are equal'); |
|
158 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are equal'); |
|
159 | 159 | $loginSuccess = true; |
160 | 160 | } elseif (!empty($applicationId)) { |
161 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are not equal'); |
|
161 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are not equal'); |
|
162 | 162 | // TODO: remove this code as soon as the secret key has been fully established |
163 | 163 | // basically this does allow an external login with an applicationIndex match against the User-Password |
164 | 164 | // the way it had been used in the start |
165 | 165 | if ($user->getCredential() == $filter->filter($credential)) { |
166 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials2 test'); |
|
166 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials2 test'); |
|
167 | 167 | $loginSuccess = true; |
168 | 168 | } |
169 | 169 | } |
@@ -42,9 +42,9 @@ |
||
42 | 42 | $this->setApplicationKey($applicationKey); |
43 | 43 | } |
44 | 44 | |
45 | - /** |
|
46 | - * @param ContainerInterface $serviceManager |
|
47 | - */ |
|
45 | + /** |
|
46 | + * @param ContainerInterface $serviceManager |
|
47 | + */ |
|
48 | 48 | public function setServiceLocator(ContainerInterface $serviceManager) |
49 | 49 | { |
50 | 50 | $this->serviceManager = $serviceManager; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @param string $requestedName |
26 | 26 | * @param null|array $options |
27 | 27 | * |
28 | - * @return object |
|
28 | + * @return RegisterConfirmation |
|
29 | 29 | * @throws ServiceNotFoundException if unable to resolve the service. |
30 | 30 | * @throws ServiceNotCreatedException if an exception is raised when |
31 | 31 | * creating a service. |