ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DefaultSimpleSamlFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Saml;
22
23use SimpleSAML\Utils\Crypto;
24use SimpleSAML\Utils\Config\Metadata;
25use SimpleSAML\Store\StoreInterface;
26use SimpleSAML\Store\SQLStore;
27use SimpleSAML\Metadata\Signer;
28use SimpleSAML\Configuration;
29use SimpleSAML\Auth\Source;
30use SimpleSAML\Metadata\SAMLBuilder;
31
33{
34 public function sourceById(string $id): Source
35 {
36 return Source::getById($id);
37 }
38
39 public function sign(string $metadata, array $entity, string $type): string
40 {
41 return Signer::sign($metadata, $entity, $type);
42 }
43
44 public function store(): StoreInterface
45 {
46 return new SQLStore();
47 }
48
49 public function configFromArray(array $config): Configuration
50 {
51 return Configuration::loadFromArray($config);
52 }
53
54 public function contact(?array $contact): array
55 {
56 return Metadata::getContact($contact);
57 }
58
59 public function crypt(): Crypto
60 {
61 return new Crypto();
62 }
63
64 public function builder(string $id): SAMLBuilder
65 {
66 return new SAMLBuilder($id);
67 }
68}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
sign(string $metadata, array $entity, string $type)