PHP 클래스 JWTAuth, someline-starter

상속: extends Tymon\JWTAuth\Facades\JWTAuth
파일 보기 프로젝트 열기: someline/someline-starter 1 사용 예제들

공개 메소드들

메소드 설명
attempt ( array $credentials = [], array $customClaims = [] ) : false | string Attempt to authenticate the user and return the token.
authenticate ( mixed $token = false ) : mixed Authenticate a user via a token.
fromUser ( mixed $user, array $customClaims = [] ) : string Generate a token using the user identifier as the subject claim.
getIdentifier ( ) : string Get the identifier.
getPayload ( mixed $token = false ) : Tymon\JWTAuth\Payload Get the raw Payload instance.
getToken ( ) : boolean | string Get the token.
invalidate ( mixed $token = false ) : boolean Invalidate a token (add it to the blacklist).
manager ( ) : Tymon\JWTAuth\JWTManager Get the JWTManager instance.
parseToken ( $method = 'bearer', $header = 'authorization', string $query = 'token' ) : JWTAuth Parse the token from the request.
refresh ( mixed $token = false ) : string Refresh an expired token.
setIdentifier ( string $identifier ) Set the identifier.
setRequest ( Request $request ) Set the request instance.
setToken ( string $token ) Set the token.
toUser ( boolean | string $token = false ) : mixed Find a user using the user identifier in the subject claim.

메소드 상세

attempt() 공개 정적인 메소드

Attempt to authenticate the user and return the token.
public static attempt ( array $credentials = [], array $customClaims = [] ) : false | string
$credentials array
$customClaims array
리턴 false | string

authenticate() 공개 정적인 메소드

Authenticate a user via a token.
public static authenticate ( mixed $token = false ) : mixed
$token mixed
리턴 mixed

fromUser() 공개 정적인 메소드

Generate a token using the user identifier as the subject claim.
public static fromUser ( mixed $user, array $customClaims = [] ) : string
$user mixed
$customClaims array
리턴 string

getIdentifier() 공개 정적인 메소드

Get the identifier.
public static getIdentifier ( ) : string
리턴 string

getPayload() 공개 정적인 메소드

Get the raw Payload instance.
public static getPayload ( mixed $token = false ) : Tymon\JWTAuth\Payload
$token mixed
리턴 Tymon\JWTAuth\Payload

getToken() 공개 정적인 메소드

Get the token.
public static getToken ( ) : boolean | string
리턴 boolean | string

invalidate() 공개 정적인 메소드

Invalidate a token (add it to the blacklist).
public static invalidate ( mixed $token = false ) : boolean
$token mixed
리턴 boolean

manager() 공개 정적인 메소드

Get the JWTManager instance.
public static manager ( ) : Tymon\JWTAuth\JWTManager
리턴 Tymon\JWTAuth\JWTManager

parseToken() 공개 정적인 메소드

Parse the token from the request.
public static parseToken ( $method = 'bearer', $header = 'authorization', string $query = 'token' ) : JWTAuth
$query string
리턴 JWTAuth

refresh() 공개 정적인 메소드

Refresh an expired token.
public static refresh ( mixed $token = false ) : string
$token mixed
리턴 string

setIdentifier() 공개 정적인 메소드

Set the identifier.
public static setIdentifier ( string $identifier )
$identifier string

setRequest() 공개 정적인 메소드

Set the request instance.
public static setRequest ( Request $request )
$request Request

setToken() 공개 정적인 메소드

Set the token.
public static setToken ( string $token )
$token string

toUser() 공개 정적인 메소드

Find a user using the user identifier in the subject claim.
public static toUser ( boolean | string $token = false ) : mixed
$token boolean | string
리턴 mixed