-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathmodule_oidc.php
More file actions
131 lines (116 loc) · 3.99 KB
/
module_oidc.php
File metadata and controls
131 lines (116 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
declare(strict_types=1);
/*
* This file is part of the simplesamlphp-module-oidc.
*
* Copyright (C) 2018 by the Spanish Research and Academic Network.
*
* This code was developed by Universidad de Córdoba (UCO https://www.uco.es)
* for the RedIRIS SIR service (SIR: http://www.rediris.es/sir)
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use SimpleSAML\Module\oidc\ModuleConfig;
$config = [
ModuleConfig::OPTION_TOKEN_AUTHORIZATION_CODE_TTL => 'PT10M',
ModuleConfig::OPTION_TOKEN_REFRESH_TOKEN_TTL => 'P1M',
ModuleConfig::OPTION_TOKEN_ACCESS_TOKEN_TTL => 'PT1H',
ModuleConfig::OPTION_PROTOCOL_SIGNATURE_KEY_PAIRS => [
[
ModuleConfig::KEY_ALGORITHM => \SimpleSAML\OpenID\Algorithms\SignatureAlgorithmEnum::RS256,
ModuleConfig::KEY_PRIVATE_KEY_FILENAME => ModuleConfig::DEFAULT_PKI_PRIVATE_KEY_FILENAME,
ModuleConfig::KEY_PUBLIC_KEY_FILENAME => ModuleConfig::DEFAULT_PKI_CERTIFICATE_FILENAME,
// ModuleConfig::KEY_PRIVATE_KEY_PASSWORD => 'private-key-password', // Optional
// ModuleConfig::KEY_KEY_ID => 'rsa-connect-signing-key-2026', // Optional
],
],
ModuleConfig::OPTION_AUTH_SOURCE => 'example-userpass',
ModuleConfig::OPTION_AUTH_USER_IDENTIFIER_ATTRIBUTE => 'uid',
ModuleConfig::OPTION_ADMIN_UI_PERMISSIONS => [
'attribute' => 'eduPersonEntitlement',
'client' => ['urn:example:oidc:manage:client'],
],
ModuleConfig::OPTION_AUTH_PROCESSING_FILTERS => [
// For conformance tests we always have an authproc run just to confirm nothing is broken
// with the integration to ProcessingChain
5 => [
'class' => 'core:AttributeAdd',
'someUnusedAttribute' => 'Some value',
]
],
// Use the below auth processing config to test authprocs with a redirect
/* ModuleConfig::OPTION_AUTH_PROCESSING_FILTERS => [
5 => [
'class' => 'core:AttributeAdd',
'%replace',
'givenName' => 'First AuthProc',
],
10 => [
'class' => 'preprodwarning:Warning',
],
15 => [
'class' => 'core:AttributeAdd',
'%replace',
'sn' => 'SN AuthProc',
]
],*/
ModuleConfig::OPTION_AUTH_CUSTOM_SCOPES => [
],
ModuleConfig::OPTION_AUTH_SAML_TO_OIDC_TRANSLATE_TABLE => [
'middle_name' => [
'middle_name'
],
'picture' => [
'jpegURL',
],
'website' => [
'website'
],
'gender' => [
'gender'
],
'birthdate' => [
'birthdate'
],
'zoneinfo' => [
'zoneinfo'
],
'updated_at' => [
'type' => 'int',
'updated_at'
],
'email_verified' => [
'type' => 'bool',
'attributes' => ['email_verified']
],
'address' => [
'type' => 'json',
'claims' => [
'formatted' => ['postalAddress'],
'street_address' => ['street_address'],
'locality' => ['locality'],
'region' => ['region'],
'postal_code' => ['postal_code'],
'country' => ['country'],
]
],
'phone_number_verified' => [
'type' => 'bool',
'phone_number_verified'
],
],
ModuleConfig::OPTION_AUTH_ACR_VALUES_SUPPORTED => [
'1',
'0',
],
ModuleConfig::OPTION_AUTH_SOURCES_TO_ACR_VALUES_MAP => [
'example-userpass' => ['1', '0'],
],
ModuleConfig::OPTION_AUTH_FORCED_ACR_VALUE_FOR_COOKIE_AUTHENTICATION => null,
ModuleConfig::OPTION_CRON_TAG => 'hourly',
ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER => \Symfony\Component\Cache\Adapter\FilesystemAdapter::class,
ModuleConfig::OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS => [
// Use defaults
],
];