PHP Interface Jose\Object\JWKSetInterface

Inheritance: extends Countable, extends Iterator, extends JsonSerializable, extends ArrayAccess
Afficher le fichier Open project: spomky-labs/jose Interface Usage Examples

Méthodes publiques

Méthode Description
addKey ( Jose\Object\JWKInterface $key ) Add key in the key set.
countKeys ( ) : integer
getKey ( $index ) : Jose\Object\JWKInterface
getKeys ( ) : Jose\Object\JWKInterface[] Returns all keys in the key set.
hasKey ( $index ) : boolean
removeKey ( integer $index ) Remove key from the key set.
selectKey ( string $type, string | null $algorithm = null, array $restrictions = [] ) : Jose\Object\JWKInterface | null
toPEM ( ) : string[] Returns RSA/EC keys in the key set into PEM format Note that if the key set contains other key types (none, oct, OKP.

Method Details

addKey() public méthode

Add key in the key set.
public addKey ( Jose\Object\JWKInterface $key )
$key Jose\Object\JWKInterface

countKeys() public méthode

public countKeys ( ) : integer
Résultat integer

getKey() public méthode

public getKey ( $index ) : Jose\Object\JWKInterface
$index
Résultat Jose\Object\JWKInterface

getKeys() public méthode

Returns all keys in the key set.
public getKeys ( ) : Jose\Object\JWKInterface[]
Résultat Jose\Object\JWKInterface[] An array of keys stored in the key set

hasKey() public méthode

public hasKey ( $index ) : boolean
$index
Résultat boolean

removeKey() public méthode

Remove key from the key set.
public removeKey ( integer $index )
$index integer Key to remove from the key set

selectKey() public méthode

public selectKey ( string $type, string | null $algorithm = null, array $restrictions = [] ) : Jose\Object\JWKInterface | null
$type string Must be 'sig' (signature) or 'enc' (encryption)
$algorithm string | null Specifies the algorithm to be used
$restrictions array More restrictions such as 'kid' or 'kty'
Résultat Jose\Object\JWKInterface | null

toPEM() public méthode

..), they will not be part of the result. If keys have a key ID, it is used as index.
public toPEM ( ) : string[]
Résultat string[]