JWS
in package
implements
JWT
Table of Contents
Interfaces
Properties
- $encodedPayload : null|string
- $isPayloadDetached : bool
- $payload : null|string
- $signatures : array<string|int, Signature>
Methods
- __construct() : mixed
- countSignatures() : int
- Returns the number of signature associated with the JWS.
- getEncodedPayload() : string|null
- Returns the Base64Url encoded payload.
- getPayload() : string|null
- Returns the payload of the JWT.
- getSignature() : Signature
- Returns the signature at the given index.
- getSignatures() : array<string|int, Signature>
- Returns the signatures associated with the JWS.
- isPayloadDetached() : bool
- Returns true if the payload is detached.
- split() : array<string|int, JWS>
- This method splits the JWS into a list of JWSs.
Properties
$encodedPayload
private
null|string
$encodedPayload
$isPayloadDetached
private
bool
$isPayloadDetached
= false
$payload
private
null|string
$payload
$signatures
private
array<string|int, Signature>
$signatures
= []
Methods
__construct()
public
__construct(string|null $payload[, string|null $encodedPayload = null ][, bool $isPayloadDetached = false ]) : mixed
Parameters
- $payload : string|null
- $encodedPayload : string|null = null
- $isPayloadDetached : bool = false
countSignatures()
Returns the number of signature associated with the JWS.
public
countSignatures() : int
Return values
intgetEncodedPayload()
Returns the Base64Url encoded payload.
public
getEncodedPayload() : string|null
If the payload is detached, this method returns null.
Return values
string|nullgetPayload()
Returns the payload of the JWT.
public
getPayload() : string|null
null is a valid payload (e.g. JWS with detached payload).
Return values
string|nullgetSignature()
Returns the signature at the given index.
public
getSignature(int $id) : Signature
Parameters
- $id : int
Tags
Return values
SignaturegetSignatures()
Returns the signatures associated with the JWS.
public
getSignatures() : array<string|int, Signature>
Return values
array<string|int, Signature>isPayloadDetached()
Returns true if the payload is detached.
public
isPayloadDetached() : bool
Return values
boolsplit()
This method splits the JWS into a list of JWSs.
public
split() : array<string|int, JWS>
It is only useful when the JWS contains more than one signature (JSON General Serialization).