HumHub Documentation (unofficial)

CompactSerializer extends Serializer
in package

FinalYes

Table of Contents

Constants

NAME  = 'jws_compact'

Methods

displayName()  : string
name()  : string
The name of the serialization.
serialize()  : string
Converts a JWS into a string.
unserialize()  : JWS
Loads data and return a JWS object.
isPayloadEncoded()  : bool

Constants

Methods

name()

The name of the serialization.

public name() : string
Return values
string

serialize()

Converts a JWS into a string.

public serialize(JWS $jws[, int|null $signatureIndex = null ]) : string
Parameters
$jws : JWS
$signatureIndex : int|null = null
Tags
throws
LogicException

if the JWS has unprotected header (invalid for compact JSON)

throws
LogicException

if the payload is not encoded but contains unauthorized characters

Return values
string

unserialize()

Loads data and return a JWS object.

public unserialize(string $input) : JWS
Parameters
$input : string

A string that represents a JWS

Tags
throws
InvalidArgumentException

if the input is invalid

Return values
JWS

isPayloadEncoded()

protected isPayloadEncoded(array<string|int, mixed> $protectedHeader) : bool
Parameters
$protectedHeader : array<string|int, mixed>
Return values
bool
Loading…
On this page

Search results