Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Auth;
4
 
5
trait Authenticatable
6
{
7
    /**
8
     * The column name of the "remember me" token.
9
     *
10
     * @var string
11
     */
12
    protected $rememberTokenName = 'remember_token';
13
 
14
    /**
15
     * Get the name of the unique identifier for the user.
16
     *
17
     * @return string
18
     */
19
    public function getAuthIdentifierName()
20
    {
21
        return $this->getKeyName();
22
    }
23
 
24
    /**
25
     * Get the unique identifier for the user.
26
     *
27
     * @return mixed
28
     */
29
    public function getAuthIdentifier()
30
    {
31
        return $this->{$this->getAuthIdentifierName()};
32
    }
33
 
34
    /**
35
     * Get the unique broadcast identifier for the user.
36
     *
37
     * @return mixed
38
     */
39
    public function getAuthIdentifierForBroadcasting()
40
    {
41
        return $this->getAuthIdentifier();
42
    }
43
 
44
    /**
45
     * Get the password for the user.
46
     *
47
     * @return string
48
     */
49
    public function getAuthPassword()
50
    {
51
        return $this->password;
52
    }
53
 
54
    /**
55
     * Get the token value for the "remember me" session.
56
     *
57
     * @return string|null
58
     */
59
    public function getRememberToken()
60
    {
61
        if (! empty($this->getRememberTokenName())) {
62
            return (string) $this->{$this->getRememberTokenName()};
63
        }
64
    }
65
 
66
    /**
67
     * Set the token value for the "remember me" session.
68
     *
69
     * @param  string  $value
70
     * @return void
71
     */
72
    public function setRememberToken($value)
73
    {
74
        if (! empty($this->getRememberTokenName())) {
75
            $this->{$this->getRememberTokenName()} = $value;
76
        }
77
    }
78
 
79
    /**
80
     * Get the column name for the "remember me" token.
81
     *
82
     * @return string
83
     */
84
    public function getRememberTokenName()
85
    {
86
        return $this->rememberTokenName;
87
    }
88
}