class EnsureClientIsResourceOwner extends ValidateToken

Methods

__construct(ServerFactory $servers)

Create a new middleware instance.

static string
using(array|string $param, string ...$params)

Specify the parameters for the middleware.

Response
handle(Request $request, Closure $next, string ...$params)

Handle an incoming request.

validateToken(Request $request)

Validate and get the request's access token.

void
validate(ScopeAuthorizable $token, string ...$params)

Determine if the token's client is the resource owner and has all the given scopes.

Details

in ValidateToken at line 24
__construct(ServerFactory $servers)

Create a new middleware instance.

Parameters

ServerFactory $servers

in ValidateToken at line 34
static string using(array|string $param, string ...$params)

Specify the parameters for the middleware.

Parameters

array|string $param
string ...$params

Return Value

string

in ValidateToken at line 48
Response handle(Request $request, Closure $next, string ...$params)

Handle an incoming request.

Parameters

Request $request
Closure $next
string ...$params

Return Value

Response

in ValidateToken at line 76
protected ScopeAuthorizable validateToken(Request $request)

Validate and get the request's access token.

Parameters

Request $request

Return Value

ScopeAuthorizable

Exceptions

AuthenticationException

at line 19
protected void validate(ScopeAuthorizable $token, string ...$params)

Determine if the token's client is the resource owner and has all the given scopes.

Parameters

ScopeAuthorizable $token
string ...$params

Return Value

void

Exceptions

MissingScopeException