Skip to content

Commit 675b2fa

Browse files
Merge pull request #42 from minvws/update-oidc-config
Update OIDC config
2 parents 058238f + 9b9afe6 commit 675b2fa

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

config/oidc.php

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,54 @@
2121
'client_secret' => env('OIDC_CLIENT_SECRET', ''),
2222

2323
/**
24-
* Configuration for the token authentication.
24+
* Configuration for client authentication.
25+
*
26+
* By default, the client authentication method used is either `client_secret_basic`, `client_secret_post`,
27+
* `client_secret_jwt`, or no authentication, depending on provider support.
28+
* To use `private_key_jwt` client authentication, configure the options below.
2529
*/
2630
'client_authentication' => [
31+
2732
/**
28-
* When you want to use `private_key_jwt` client authentication then you can specify the path to the private key.
33+
* The file path to the private key used for client authentication.
34+
* This private key is required for signing the JWT when using `private_key_jwt` client authentication.
35+
*
36+
* Example: '/path/to/private.key'
2937
*/
3038
'signing_private_key_path' => env('OIDC_SIGNING_PRIVATE_KEY_PATH'),
3139

3240
/**
33-
* When you want to use `private_key_jwt` client authentication then you can specify the signing algorithm.
34-
* For a list of supported algorithms see https://tools.ietf.org/html/rfc7518#section-3.1
41+
* The signing algorithm used for `private_key_jwt` client authentication.
42+
*
43+
* Default: 'RS256'
44+
* Example Values: 'RS256', 'HS256', 'ES256'
45+
* For a list of supported algorithms, see https://tools.ietf.org/html/rfc7518#section-3.1
3546
*/
3647
'signing_algorithm' => env('OIDC_SIGNING_ALGORITHM', 'RS256'),
3748

3849
/**
39-
* When you want to use `private_key_jwt` client authentication then need
40-
* to specify the available signature algorithms.
50+
* A list of signature algorithms available for use.
51+
* This list is used to configure the AlgorithmManager and should include class names.
4152
*
42-
* The input is used for the AlgorithmManager and should be a list of class names.
43-
* See https://web-token.spomky-labs.com/the-components/algorithm-management-jwa
53+
* For more details, see https://web-token.spomky-labs.com/the-components/algorithm-management-jwa
4454
*/
4555
'signature_algorithms' => [
4656
\Jose\Component\Signature\Algorithm\RS256::class,
4757
],
4858

4959
/**
50-
* Token lifetime in seconds, used to set the expiration time of the JWT.
51-
* This is used when you are using `private_key_jwt` client authentication.
60+
* The duration (in seconds) for which the token remains valid.
61+
* This sets the expiration time of the JWT when using `private_key_jwt` client authentication.
5262
*/
5363
'token_lifetime_in_seconds' => 60,
64+
5465
],
5566

5667
/**
57-
* Only needed when response of user info endpoint is encrypted.
58-
* This is the path to the JWE decryption key.
68+
* Path to the private key used to decrypt the JWE response from the user info endpoint.
69+
* This is only required when the response from the user info endpoint is encrypted.
5970
*
60-
* You could add multiple decryption key paths comma separated.
71+
* Multiple decryption key paths can be specified, separated by commas.
6172
*/
6273
'decryption_key_path' => env('OIDC_DECRYPTION_KEY_PATH', ''),
6374

@@ -75,6 +86,7 @@
7586
* Configuration Cache
7687
*/
7788
'configuration_cache' => [
89+
7890
/**
7991
* The cache store to use.
8092
*/
@@ -84,12 +96,14 @@
8496
* The cache TTL in seconds.
8597
*/
8698
'ttl' => env('OIDC_CONFIGURATION_CACHE_TTL', 60 * 60 * 24),
99+
87100
],
88101

89102
/**
90103
* Route configuration
91104
*/
92105
'route_configuration' => [
106+
93107
/**
94108
* Enable or disable the login route.
95109
*/
@@ -111,6 +125,7 @@
111125
* The prefix of the login route.
112126
*/
113127
'prefix' => '',
128+
114129
],
115130

116131
/**

phpcs.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<ruleset>
33
<arg name="basepath" value="."/>
44

5+
<file>./config</file>
6+
<file>./routes</file>
57
<file>./src</file>
68
<file>./tests</file>
79

0 commit comments

Comments
 (0)