MediaWiki master
JwtCodec.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Json;
4
12interface JwtCodec {
13
18 public function isEnabled(): bool;
19
23 public function create( array $claims ): string;
24
31 public function parse( string $jwt ): array;
32
33}
A helper to read and write JWTs without having to depend on a specific library, and using central con...
Definition JwtCodec.php:12
create(array $claims)
Creates a JWT string with the given claims.
isEnabled()
Whether the codec can be used (disabled means it hasn't been properly configured).
parse(string $jwt)
Parses and partially validates a JWT string, and returns the set of claim inside it.