ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Key.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Firebase\JWT
;
4
5
use
InvalidArgumentException
;
6
use
OpenSSLAsymmetricKey
;
7
use
OpenSSLCertificate
;
8
use
TypeError
;
9
10
class
Key
11
{
13
private
$keyMaterial
;
15
private
string
$algorithm
;
16
21
public
function
__construct
(
22
$keyMaterial
,
23
string
$algorithm
24
) {
25
if
(
26
!\is_string(
$keyMaterial
)
27
&& !
$keyMaterial
instanceof
OpenSSLAsymmetricKey
28
&& !
$keyMaterial
instanceof
OpenSSLCertificate
29
&& !\is_resource(
$keyMaterial
)
30
) {
31
throw
new
TypeError
(
'Key material must be a string, resource, or OpenSSLAsymmetricKey'
);
32
}
33
34
if
(empty(
$keyMaterial
)) {
35
throw
new
InvalidArgumentException
(
'Key material must not be empty'
);
36
}
37
38
if
(empty($algorithm)) {
39
throw
new
InvalidArgumentException
(
'Algorithm must not be empty'
);
40
}
41
42
// TODO: Remove in PHP 8.0 in favor of class constructor property promotion
43
$this->keyMaterial =
$keyMaterial
;
44
$this->algorithm =
$algorithm
;
45
}
46
52
public
function
getAlgorithm
(): string
53
{
54
return
$this->algorithm
;
55
}
56
60
public
function
getKeyMaterial
()
61
{
62
return
$this->keyMaterial
;
63
}
64
}
Firebase\JWT\Key\getKeyMaterial
getKeyMaterial()
Definition:
Key.php:60
Firebase\JWT\Key\$keyMaterial
$keyMaterial
Definition:
Key.php:13
Firebase\JWT\Key\getAlgorithm
getAlgorithm()
Return the algorithm valid for this key.
Definition:
Key.php:52
Firebase\JWT\Key
Definition:
Key.php:10
Firebase\JWT\Key\$algorithm
string $algorithm
Definition:
Key.php:15
OpenSSLAsymmetricKey
TypeError
OpenSSLCertificate
InvalidArgumentException
Firebase\JWT\Key\__construct
__construct( $keyMaterial, string $algorithm)
Definition:
Key.php:21
Firebase\JWT
Definition:
BeforeValidException.php:3
Services
LTI
src
Firebase
Key.php
Generated on Tue Apr 1 2025 22:02:24 for ILIAS by
1.8.13 (using
Doxyfile
)