Laravel version update
Laravel version update
This commit is contained in:
58
vendor/tymon/jwt-auth/src/Contracts/Claim.php
vendored
Normal file
58
vendor/tymon/jwt-auth/src/Contracts/Claim.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts;
|
||||
|
||||
interface Claim
|
||||
{
|
||||
/**
|
||||
* Set the claim value, and call a validate method.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value);
|
||||
|
||||
/**
|
||||
* Get the claim value.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue();
|
||||
|
||||
/**
|
||||
* Set the claim name.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
/**
|
||||
* Get the claim name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* Validate the Claim value.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateCreate($value);
|
||||
}
|
||||
26
vendor/tymon/jwt-auth/src/Contracts/Http/Parser.php
vendored
Normal file
26
vendor/tymon/jwt-auth/src/Contracts/Http/Parser.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts\Http;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
interface Parser
|
||||
{
|
||||
/**
|
||||
* Parse the request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function parse(Request $request);
|
||||
}
|
||||
29
vendor/tymon/jwt-auth/src/Contracts/JWTSubject.php
vendored
Normal file
29
vendor/tymon/jwt-auth/src/Contracts/JWTSubject.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts;
|
||||
|
||||
interface JWTSubject
|
||||
{
|
||||
/**
|
||||
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getJWTIdentifier();
|
||||
|
||||
/**
|
||||
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getJWTCustomClaims();
|
||||
}
|
||||
40
vendor/tymon/jwt-auth/src/Contracts/Providers/Auth.php
vendored
Normal file
40
vendor/tymon/jwt-auth/src/Contracts/Providers/Auth.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts\Providers;
|
||||
|
||||
interface Auth
|
||||
{
|
||||
/**
|
||||
* Check a user's credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function byCredentials(array $credentials);
|
||||
|
||||
/**
|
||||
* Authenticate a user via the id.
|
||||
*
|
||||
* @param mixed $id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function byId($id);
|
||||
|
||||
/**
|
||||
* Get the currently authenticated user.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function user();
|
||||
}
|
||||
29
vendor/tymon/jwt-auth/src/Contracts/Providers/JWT.php
vendored
Normal file
29
vendor/tymon/jwt-auth/src/Contracts/Providers/JWT.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts\Providers;
|
||||
|
||||
interface JWT
|
||||
{
|
||||
/**
|
||||
* @param array $payload
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function encode(array $payload);
|
||||
|
||||
/**
|
||||
* @param string $token
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function decode($token);
|
||||
}
|
||||
51
vendor/tymon/jwt-auth/src/Contracts/Providers/Storage.php
vendored
Normal file
51
vendor/tymon/jwt-auth/src/Contracts/Providers/Storage.php
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts\Providers;
|
||||
|
||||
interface Storage
|
||||
{
|
||||
/**
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param int $minutes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($key, $value, $minutes);
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function forever($key, $value);
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($key);
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy($key);
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function flush();
|
||||
}
|
||||
33
vendor/tymon/jwt-auth/src/Contracts/Validator.php
vendored
Normal file
33
vendor/tymon/jwt-auth/src/Contracts/Validator.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Contracts;
|
||||
|
||||
interface Validator
|
||||
{
|
||||
/**
|
||||
* Perform some checks on the value.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function check($value);
|
||||
|
||||
/**
|
||||
* Helper function to return a boolean.
|
||||
*
|
||||
* @param array $value
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($value);
|
||||
}
|
||||
Reference in New Issue
Block a user