114 lines
2.9 KiB
YAML
114 lines
2.9 KiB
YAML
name: TokenGuard
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Guard
|
|
type: class
|
|
source: Illuminate\Contracts\Auth\Guard
|
|
- name: UserProvider
|
|
type: class
|
|
source: Illuminate\Contracts\Auth\UserProvider
|
|
- name: Request
|
|
type: class
|
|
source: Illuminate\Http\Request
|
|
- name: Macroable
|
|
type: class
|
|
source: Illuminate\Support\Traits\Macroable
|
|
properties:
|
|
- name: request
|
|
visibility: protected
|
|
comment: '# * The request instance.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Http\Request'
|
|
- name: inputKey
|
|
visibility: protected
|
|
comment: '# * The name of the query string item from the request containing the
|
|
API token.
|
|
|
|
# *
|
|
|
|
# * @var string'
|
|
- name: storageKey
|
|
visibility: protected
|
|
comment: '# * The name of the token "column" in persistent storage.
|
|
|
|
# *
|
|
|
|
# * @var string'
|
|
- name: hash
|
|
visibility: protected
|
|
comment: '# * Indicates if the API token is hashed in storage.
|
|
|
|
# *
|
|
|
|
# * @var bool'
|
|
methods:
|
|
- name: __construct
|
|
visibility: public
|
|
parameters:
|
|
- name: provider
|
|
- name: request
|
|
- name: inputKey
|
|
default: '''api_token'''
|
|
- name: storageKey
|
|
default: '''api_token'''
|
|
- name: hash
|
|
default: 'false'
|
|
comment: "# * The request instance.\n# *\n# * @var \\Illuminate\\Http\\Request\n\
|
|
# */\n# protected $request;\n# \n# /**\n# * The name of the query string item\
|
|
\ from the request containing the API token.\n# *\n# * @var string\n# */\n# protected\
|
|
\ $inputKey;\n# \n# /**\n# * The name of the token \"column\" in persistent storage.\n\
|
|
# *\n# * @var string\n# */\n# protected $storageKey;\n# \n# /**\n# * Indicates\
|
|
\ if the API token is hashed in storage.\n# *\n# * @var bool\n# */\n# protected\
|
|
\ $hash = false;\n# \n# /**\n# * Create a new authentication guard.\n# *\n# *\
|
|
\ @param \\Illuminate\\Contracts\\Auth\\UserProvider $provider\n# * @param \
|
|
\ \\Illuminate\\Http\\Request $request\n# * @param string $inputKey\n# * @param\
|
|
\ string $storageKey\n# * @param bool $hash\n# * @return void"
|
|
- name: user
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Get the currently authenticated user.
|
|
|
|
# *
|
|
|
|
# * @return \Illuminate\Contracts\Auth\Authenticatable|null'
|
|
- name: getTokenForRequest
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Get the token for the current request.
|
|
|
|
# *
|
|
|
|
# * @return string|null'
|
|
- name: validate
|
|
visibility: public
|
|
parameters:
|
|
- name: credentials
|
|
default: '[]'
|
|
comment: '# * Validate a user''s credentials.
|
|
|
|
# *
|
|
|
|
# * @param array $credentials
|
|
|
|
# * @return bool'
|
|
- name: setRequest
|
|
visibility: public
|
|
parameters:
|
|
- name: request
|
|
comment: '# * Set the current request instance.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Http\Request $request
|
|
|
|
# * @return $this'
|
|
traits:
|
|
- Illuminate\Contracts\Auth\Guard
|
|
- Illuminate\Contracts\Auth\UserProvider
|
|
- Illuminate\Http\Request
|
|
- Illuminate\Support\Traits\Macroable
|
|
- GuardHelpers
|
|
interfaces:
|
|
- Guard
|