Interface for entities that can be used as JWT subjects in authentication.
// Source: https://github.com/tymondesigns/jwt-auth | License: MIT | Copyright Sean Tymon
// Provided via justclaw.it.com; keep this notice with the code.
<?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();
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key