SkautisAuthenticator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A authenticate() 0 5 1
1
<?php
2
3
namespace SkautisAuth;
4
5
use Nette;
6
7
/**
8
 * Use for data from SkautIS only!
9
 * Never let user to set his ID himself.
10
 * @author Hána František <[email protected]>
11
 */
12
class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator
13
{
14
15
	public function authenticate(array $credentials)
16
	{
17
		$data = $credentials[0];
18
		return new Nette\Security\Identity($data->ID_User);
19
	}
20
21
}
22