githubtrue/backend/vendor/illuminate/auth/Authenticatable.php @ f24e2d9d
1 |
<?php
|
---|---|
2 |
|
3 |
namespace Illuminate\Auth; |
4 |
|
5 |
trait Authenticatable |
6 |
{
|
7 |
/**
|
8 |
* Get the name of the unique identifier for the user.
|
9 |
*
|
10 |
* @return string
|
11 |
*/
|
12 |
public function getAuthIdentifierName() |
13 |
{
|
14 |
return $this->getKeyName(); |
15 |
}
|
16 |
|
17 |
/**
|
18 |
* Get the unique identifier for the user.
|
19 |
*
|
20 |
* @return mixed
|
21 |
*/
|
22 |
public function getAuthIdentifier() |
23 |
{
|
24 |
return $this->getKey(); |
25 |
}
|
26 |
|
27 |
/**
|
28 |
* Get the password for the user.
|
29 |
*
|
30 |
* @return string
|
31 |
*/
|
32 |
public function getAuthPassword() |
33 |
{
|
34 |
return $this->password; |
35 |
}
|
36 |
|
37 |
/**
|
38 |
* Get the token value for the "remember me" session.
|
39 |
*
|
40 |
* @return string
|
41 |
*/
|
42 |
public function getRememberToken() |
43 |
{
|
44 |
return $this->{$this->getRememberTokenName()}; |
45 |
}
|
46 |
|
47 |
/**
|
48 |
* Set the token value for the "remember me" session.
|
49 |
*
|
50 |
* @param string $value
|
51 |
* @return void
|
52 |
*/
|
53 |
public function setRememberToken($value) |
54 |
{
|
55 |
$this->{$this->getRememberTokenName()} = $value; |
56 |
}
|
57 |
|
58 |
/**
|
59 |
* Get the column name for the "remember me" token.
|
60 |
*
|
61 |
* @return string
|
62 |
*/
|
63 |
public function getRememberTokenName() |
64 |
{
|
65 |
return 'remember_token'; |
66 |
}
|
67 |
}
|