trait AuthenticatesRequests

Properties

protected Authenticator|null $authenticator

The authenticator used in requests.

Methods

defaultAuth()

Resolve the default authenticator.

authenticator()

Get the authenticator.

authenticate(Authenticator $authenticator)

Authenticate the request with an authenticator.

withToken(string $token, string $type = 'Bearer')

Authenticate the request with a token.

withBasicAuth(string $username, string $password)

Authenticate the request with basic authentication.

withDigestAuth(string $username, string $password)

Authenticate the request with digest authentication.

Details

at line 23
protected Authenticator|null defaultAuth()

Resolve the default authenticator.

Return Value

Authenticator|null

at line 31
Authenticator|null authenticator()

Get the authenticator.

Return Value

Authenticator|null

at line 41
AuthenticatesRequests authenticate(Authenticator $authenticator)

Authenticate the request with an authenticator.

Parameters

Authenticator $authenticator

Return Value

AuthenticatesRequests

at line 53
AuthenticatesRequests withToken(string $token, string $type = 'Bearer')

Authenticate the request with a token.

Parameters

string $token
string $type

Return Value

AuthenticatesRequests

at line 63
AuthenticatesRequests withBasicAuth(string $username, string $password)

Authenticate the request with basic authentication.

Parameters

string $username
string $password

Return Value

AuthenticatesRequests

at line 73
AuthenticatesRequests withDigestAuth(string $username, string $password)

Authenticate the request with digest authentication.

Parameters

string $username
string $password

Return Value

AuthenticatesRequests