FederatedShareService
extends NCSignature
in package
Class FederatedShareService
Table of Contents
- DATE_HEADER = 'D, d M Y H:i:s T'
- DATE_OBJECT = 'Y-m-d\\TH:i:s\\Z'
- DATE_TTL = 300
- $circleService : CircleService
- $dateHeader : mixed
- $federatedEventService : FederatedEventService
- $ttl : int
- __construct() : mixed
- FederatedEventService constructor.
- downloadSignatory() : void
- generateKeys() : mixed
- getKeyOrigin() : string
- getOpenSSLAlgo() : int
- incomingSignedRequest() : NCSignedRequest
- lockItem() : FederatedShare
- retrieveSignatory() : NCSignatory
- return Signatory by its Id from cache or from direct request.
- signOutgoingRequest() : NCSignedRequest
- signString() : string
- updateSignatory() : void
- verifyString() : mixed
- getChosenEncryption() : string
- getUsedEncryption() : string
- parseIncomingSignatureHeader() : void
- setIncomingClearSignature() : void
- setIncomingSignatureHeader() : void
- setOutgoingClearSignature() : void
- setOutgoingSignatureHeader() : void
- setOutgoingSignedSignature() : void
- signingOutgoingRequest() : void
- verifyIncomingRequestContent() : void
- verifyIncomingRequestSignature() : mixed
- verifyIncomingRequestTime() : void
- verifySignedRequest() : mixed
Constants
DATE_HEADER
public
mixed
DATE_HEADER
= 'D, d M Y H:i:s T'
DATE_OBJECT
public
mixed
DATE_OBJECT
= 'Y-m-d\\TH:i:s\\Z'
DATE_TTL
public
mixed
DATE_TTL
= 300
Properties
$circleService
private
CircleService
$circleService
$dateHeader
private
mixed
$dateHeader
= self::DATE_HEADER
$federatedEventService
private
FederatedEventService
$federatedEventService
$ttl
private
int
$ttl
= self::DATE_TTL
Methods
__construct()
FederatedEventService constructor.
public
__construct(FederatedEventService $federatedEventService, CircleService $circleService) : mixed
Parameters
- $federatedEventService : FederatedEventService
- $circleService : CircleService
Return values
mixed —downloadSignatory()
public
downloadSignatory(NCSignatory $signatory[, string $keyId = '' ][, array<string|int, mixed> $params = [] ][, NCRequest|null $request = null ]) : void
Parameters
- $signatory : NCSignatory
- $keyId : string = ''
- $params : array<string|int, mixed> = []
- $request : NCRequest|null = null
Tags
Return values
void —generateKeys()
public
generateKeys(NCSignatory $signatory[, string $digest = 'rsa' ][, int $bits = 2048 ][, int $type = OPENSSL_KEYTYPE_RSA ]) : mixed
Parameters
- $signatory : NCSignatory
- $digest : string = 'rsa'
- $bits : int = 2048
- $type : int = OPENSSL_KEYTYPE_RSA
Return values
mixed —getKeyOrigin()
public
getKeyOrigin(string $keyId) : string
Parameters
- $keyId : string
Tags
Return values
string —getOpenSSLAlgo()
public
getOpenSSLAlgo(NCSignatory $signatory) : int
Parameters
- $signatory : NCSignatory
Return values
int —incomingSignedRequest()
public
incomingSignedRequest([string $body = '' ]) : NCSignedRequest
Parameters
- $body : string = ''
Tags
Return values
NCSignedRequest —lockItem()
public
lockItem(string $circleId, string $itemId) : FederatedShare
Parameters
- $circleId : string
- $itemId : string
Tags
Return values
FederatedShare —retrieveSignatory()
return Signatory by its Id from cache or from direct request.
public
retrieveSignatory(string $keyId[, bool $refresh = false ]) : NCSignatory
Should be overwritten.
Parameters
- $keyId : string
- $refresh : bool = false
Tags
Return values
NCSignatory —signOutgoingRequest()
public
signOutgoingRequest(NCRequest $request, NCSignatory $signatory) : NCSignedRequest
Parameters
- $request : NCRequest
- $signatory : NCSignatory
Tags
Return values
NCSignedRequest —signString()
public
signString(string $clear, NCSignatory $signatory) : string
Parameters
- $clear : string
- $signatory : NCSignatory
Tags
Return values
string —updateSignatory()
public
updateSignatory(NCSignatory $signatory, array<string|int, mixed> $json[, string $keyId = '' ]) : void
Parameters
- $signatory : NCSignatory
- $json : array<string|int, mixed>
- $keyId : string = ''
Tags
Return values
void —verifyString()
public
verifyString(string $clear, string $signed, string $publicKey[, string $algo = NCSignatory::SHA256 ]) : mixed
Parameters
- $clear : string
- $signed : string
- $publicKey : string
- $algo : string = NCSignatory::SHA256
Tags
Return values
mixed —getChosenEncryption()
private
getChosenEncryption(NCSignatory $signatory) : string
Parameters
- $signatory : NCSignatory
Return values
string —getUsedEncryption()
private
getUsedEncryption(NCSignedRequest $signedRequest) : string
Parameters
- $signedRequest : NCSignedRequest
Return values
string —parseIncomingSignatureHeader()
private
parseIncomingSignatureHeader(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
void —setIncomingClearSignature()
private
setIncomingClearSignature(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
void —setIncomingSignatureHeader()
private
setIncomingSignatureHeader(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Return values
void —setOutgoingClearSignature()
private
setOutgoingClearSignature(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Return values
void —setOutgoingSignatureHeader()
private
setOutgoingSignatureHeader(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Return values
void —setOutgoingSignedSignature()
private
setOutgoingSignedSignature(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
void —signingOutgoingRequest()
private
signingOutgoingRequest(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Return values
void —verifyIncomingRequestContent()
private
verifyIncomingRequestContent(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
void —verifyIncomingRequestSignature()
private
verifyIncomingRequestSignature(NCSignedRequest $signedRequest) : mixed
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
mixed —verifyIncomingRequestTime()
private
verifyIncomingRequestTime(NCSignedRequest $signedRequest) : void
Parameters
- $signedRequest : NCSignedRequest
Tags
Return values
void —verifySignedRequest()
private
verifySignedRequest(NCSignedRequest $signedRequest) : mixed
Parameters
- $signedRequest : NCSignedRequest