Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View 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);
}

View 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);
}

View 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();
}

View 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();
}

View 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);
}

View 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();
}

View 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);
}