Properties

$username

$username : string

Username to authenticate against

Type

string

$password

$password : string

Password to authenticate against

Type

string

$uri

$uri : string

Auth URI

Type

string

$relativeUri

$relativeUri : string

Auth relative URI

Type

string

$method

$method : string

Auth method

Type

string

$type

$type : string

Auth type

Type

string

$scheme

$scheme : array

Scheme values

Type

array

$version

$version : string

HTTP version

Type

string

$code

$code : integer

Response code

Type

integer

$message

$message : string

Response message

Type

string

$headers

$headers : array

Response headers

Type

array

$body

$body : string

Response body

Type

string

Methods

getUsername()

getUsername() : string

Get the username

Returns

string

getPassword()

getPassword() : string

Get the password

Returns

string

setUsername()

setUsername(string  $username) : \Pop\Auth\Adapter\AbstractAdapter

Set the username

Parameters

string $username

Returns

\Pop\Auth\Adapter\AbstractAdapter

setPassword()

setPassword(string  $password) : \Pop\Auth\Adapter\AbstractAdapter

Set the password

Parameters

string $password

Returns

\Pop\Auth\Adapter\AbstractAdapter

authenticate()

authenticate() : integer

Method to authenticate

Returns

integer

__construct()

__construct(string  $uri, string  $method = 'GET') : \Pop\Auth\Adapter\Http

Constructor

Instantiate the Http auth adapter object

Parameters

string $uri
string $method

Throws

\Pop\Auth\Adapter\Exception

Returns

\Pop\Auth\Adapter\Http

getType()

getType() : string

Get the auth type

Returns

string

getScheme()

getScheme() : array

Get the auth scheme

Returns

array

getVersion()

getVersion() : string

Get the HTTP version

Returns

string

getCode()

getCode() : string

Get the HTTP code

Returns

string

getMessage()

getMessage() : string

Get the HTTP message

Returns

string

getHeaders()

getHeaders() : array

Get the HTTP response headers

Returns

array

getHeader()

getHeader(string  $name) : mixed

Get an HTTP response header

Parameters

string $name

Returns

mixed

getBody()

getBody() : string

Get the HTTP response body

Returns

string

generateRequest()

generateRequest() : void

Generate the request

parseScheme()

parseScheme(string  $wwwAuth) : void

Parse the scheme

Parameters

string $wwwAuth

sendRequest()

sendRequest(array  $context = null) : void

Send the request

Parameters

array $context

decodeBody()

decodeBody(string  $body, string  $decode = 'gzip') : string

Decode the body data.

Parameters

string $body
string $decode

Throws

\Pop\Auth\Adapter\Exception

Returns

string

decodeChunkedBody()

decodeChunkedBody(string  $body) : string

Decode a chunked transfer-encoded body and return the decoded text

Parameters

string $body

Returns

string