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 Laravel\Sanctum\Contracts;
4
 
5
interface HasApiTokens
6
{
7
    /**
8
     * Get the access tokens that belong to model.
9
     *
10
     * @return \Illuminate\Database\Eloquent\Relations\MorphMany
11
     */
12
    public function tokens();
13
 
14
    /**
15
     * Determine if the current API token has a given scope.
16
     *
17
     * @param  string  $ability
18
     * @return bool
19
     */
20
    public function tokenCan(string $ability);
21
 
22
    /**
23
     * Create a new personal access token for the user.
24
     *
25
     * @param  string  $name
26
     * @param  array  $abilities
27
     * @return \Laravel\Sanctum\NewAccessToken
28
     */
29
    public function createToken(string $name, array $abilities = ['*']);
30
 
31
    /**
32
     * Get the access token currently associated with the user.
33
     *
34
     * @return \Laravel\Sanctum\Contracts\HasAbilities
35
     */
36
    public function currentAccessToken();
37
 
38
    /**
39
     * Set the current access token for the user.
40
     *
41
     * @param  \Laravel\Sanctum\Contracts\HasAbilities  $accessToken
42
     * @return \Laravel\Sanctum\Contracts\HasApiTokens
43
     */
44
    public function withAccessToken($accessToken);
45
}