NCSignedRequest
in package
implements
JsonSerializable
Interfaces, Classes, Traits and Enums
- JsonSerializable
Table of Contents
- $body : string
- $clearSignature : string
- $digest : string
- $host : string
- $incomingRequest : IRequest
- $origin : string
- $outgoingRequest : NCRequest
- $signatory : NCSignatory
- $signatureHeader : SimpleDataStore
- $signedSignature : string
- $time : int
- __construct() : mixed
- getBody() : string
- Body content of the request incoming/outgoing
- getClearSignature() : string
- getDigest() : string
- getHost() : string
- getIncomingRequest() : IRequest
- IRequest of the incoming request incoming
- getOrigin() : string
- Origin of the request, based on the keyId incoming
- getOutgoingRequest() : NCRequest
- getSignatory() : NCSignatory
- getSignatureHeader() : SimpleDataStore
- Data from the 'Signature' header incoming/outgoing
- getSignedSignature() : string
- getTime() : int
- Timestamp of the request incoming (outgoing ?)
- hasSignatory() : bool
- jsonSerialize() : array<string|int, mixed>
- setBody() : self
- setClearSignature() : NCSignedRequest
- _Clear_ value of the Signature.
- setDigest() : $this
- setHost() : NCSignedRequest
- Host/Address to be used in the signature.
- setIncomingRequest() : NCSignedRequest
- setOrigin() : self
- setOutgoingRequest() : NCSignedRequest
- NCRequest of the outgoing request outgoing
- setSignatory() : void
- Signatory used to sign the request incoming/outgoing
- setSignatureHeader() : self
- setSignedSignature() : self
- _Signed_ value of the signature.
- setTime() : self
Properties
$body
private
string
$body
= ''
$clearSignature
private
string
$clearSignature
= ''
$digest
private
string
$digest
= ''
$host
private
string
$host
= ''
$incomingRequest
private
IRequest
$incomingRequest
$origin
private
string
$origin
= ''
$outgoingRequest
private
NCRequest
$outgoingRequest
$signatory
private
NCSignatory
$signatory
$signatureHeader
private
SimpleDataStore
$signatureHeader
$signedSignature
private
string
$signedSignature
= ''
$time
private
int
$time
= 0
Methods
__construct()
public
__construct([string $body = '' ]) : mixed
Parameters
- $body : string = ''
Return values
mixed —getBody()
Body content of the request incoming/outgoing
public
getBody() : string
Return values
string —getClearSignature()
public
getClearSignature() : string
Return values
string —getDigest()
public
getDigest() : string
Return values
string —getHost()
public
getHost() : string
Return values
string —getIncomingRequest()
IRequest of the incoming request incoming
public
getIncomingRequest() : IRequest
Return values
IRequest —getOrigin()
Origin of the request, based on the keyId incoming
public
getOrigin() : string
Return values
string —getOutgoingRequest()
public
getOutgoingRequest() : NCRequest
Return values
NCRequest —getSignatory()
public
getSignatory() : NCSignatory
Return values
NCSignatory —getSignatureHeader()
Data from the 'Signature' header incoming/outgoing
public
getSignatureHeader() : SimpleDataStore
Return values
SimpleDataStore —getSignedSignature()
public
getSignedSignature() : string
Return values
string —getTime()
Timestamp of the request incoming (outgoing ?)
public
getTime() : int
Return values
int —hasSignatory()
public
hasSignatory() : bool
Return values
bool —jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —setBody()
public
setBody(string $body) : self
Parameters
- $body : string
Return values
self —setClearSignature()
_Clear_ value of the Signature.
public
setClearSignature(string $clearSignature) : NCSignedRequest
incoming/outgoing
- estimated signature on incoming request
- generated signature on outgoing request
Parameters
- $clearSignature : string
Return values
NCSignedRequest —setDigest()
public
setDigest(string $digest) : $this
Parameters
- $digest : string
Return values
$this —setHost()
Host/Address to be used in the signature.
public
setHost(string $host) : NCSignedRequest
incoming/outgoing
- incoming should set the local address
- outgoing should set the recipient address
Parameters
- $host : string
Return values
NCSignedRequest —setIncomingRequest()
public
setIncomingRequest(IRequest $request) : NCSignedRequest
Parameters
- $request : IRequest
Return values
NCSignedRequest —setOrigin()
public
setOrigin(string $origin) : self
Parameters
- $origin : string
Return values
self —setOutgoingRequest()
NCRequest of the outgoing request outgoing
public
setOutgoingRequest(NCRequest $request) : NCSignedRequest
Parameters
- $request : NCRequest
Return values
NCSignedRequest —setSignatory()
Signatory used to sign the request incoming/outgoing
public
setSignatory(NCSignatory $signatory) : void
Parameters
- $signatory : NCSignatory
Return values
void —setSignatureHeader()
public
setSignatureHeader(SimpleDataStore $signatureHeader) : self
Parameters
- $signatureHeader : SimpleDataStore
Return values
self —setSignedSignature()
_Signed_ value of the signature.
public
setSignedSignature(string $signedSignature) : self
/!\ base64_encoded, not RAW /!\
incoming/outgoing
Parameters
- $signedSignature : string
Return values
self —setTime()
public
setTime(int $time) : self
Parameters
- $time : int