class AuthenticationChallenge

Methods

__construct(Repository $config, ExceptionHandler $exceptions, AuthManager $auth, ServerFactory $servers)

Create the resource authentication challenge formatter.

string
header(Request $request, string|null $error = null, array $scopes = [])

Describe the supported schemes and the supplied credential's error.

void
forGuard(Request $request, string $guard)

Add a challenge if this guard's failure becomes an authentication response.

void
forException(Request $request, AuthenticationException|MissingScopeException $exception, array|null $scopes = null)

Add a challenge to this middleware failure without replacing its rendered body.

Details

at line 25
__construct(Repository $config, ExceptionHandler $exceptions, AuthManager $auth, ServerFactory $servers)

Create the resource authentication challenge formatter.

Parameters

Repository $config
ExceptionHandler $exceptions
AuthManager $auth
ServerFactory $servers

at line 38
string header(Request $request, string|null $error = null, array $scopes = [])

Describe the supported schemes and the supplied credential's error.

Parameters

Request $request
string|null $error
array $scopes

Return Value

string

at line 68
void forGuard(Request $request, string $guard)

Add a challenge if this guard's failure becomes an authentication response.

Parameters

Request $request
string $guard

Return Value

void

at line 92
void forException(Request $request, AuthenticationException|MissingScopeException $exception, array|null $scopes = null)

Add a challenge to this middleware failure without replacing its rendered body.

Parameters

Request $request
AuthenticationException|MissingScopeException $exception
array|null $scopes

Return Value

void