Basic
in package
implements
Auth
Basic Authentication provider
Provides a handler for Basic HTTP authentication via the Authorization header.
Table of Contents
Interfaces
- Auth
- Authentication provider interface
Properties
Methods
- __construct() : mixed
- Constructor
- curl_before_send() : mixed
- Set cURL parameters before the data is sent
- fsockopen_header() : mixed
- Add extra headers to the request before sending
- getAuthString() : string
- Get the authentication string (user:pass)
- register() : mixed
- Register the necessary callbacks
Properties
$pass
Password
public
string
$pass
$user
Username
public
string
$user
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|null $args = null ]) : mixed
Parameters
- $args : array<string|int, mixed>|null = null
-
Array of user and password. Must have exactly two elements
Tags
curl_before_send()
Set cURL parameters before the data is sent
public
curl_before_send(resource|CurlHandle &$handle) : mixed
Parameters
- $handle : resource|CurlHandle
-
cURL handle
fsockopen_header()
Add extra headers to the request before sending
public
fsockopen_header(string &$out) : mixed
Parameters
- $out : string
-
HTTP header string
getAuthString()
Get the authentication string (user:pass)
public
getAuthString() : string
Return values
stringregister()
Register the necessary callbacks
public
register(Hooks $hooks) : mixed
Parameters
- $hooks : Hooks
-
Hook system