Skip to content

Commit 5bb06a4

Browse files
committed
Add some documentation
1 parent 159afdb commit 5bb06a4

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ $provider = new \OpenIDConnectClient\OpenIDConnectProvider([
3131
'publicKey' => 'file:///myproj/data/public.key',
3232

3333
// Alternatively, you can use automatic discovery as long as your server
34-
// has the <issuer>/.well-known/openid-configuration endpoint
34+
// has the <issuer>/.well-known/openid-configuration endpoint.
35+
// This endpoint will then provide all provider settings above, so you only need to provide
36+
// your own clientId, clientSecret, and redirectUri.
3537
'issuer' => 'http://example.com/oauth2'
3638
],
3739
[

example/client.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,24 @@
99
[
1010
'clientId' => 'demoapp',
1111
'clientSecret' => 'demopass',
12-
'idTokenIssuer' => 'brentertainment.com',
1312
// Your server
1413
'redirectUri' => 'http://localhost:8082/',
14+
15+
// Settings of the OP (OpenID Provider)
16+
// The issuer of the identity token (id_token) this will be compared with what is returned in the token.
17+
'idTokenIssuer' => 'brentertainment.com',
1518
'urlAuthorize' => 'http://brentertainment.com/oauth2/lockdin/authorize',
1619
'urlAccessToken' => 'http://brentertainment.com/oauth2/lockdin/token',
1720
'urlResourceOwnerDetails' => 'http://brentertainment.com/oauth2/lockdin/resource',
1821
// Find the public key here: https://github.com/bshaffer/oauth2-demo-php/blob/master/data/pubkey.pem
1922
// to test against brentertainment.com
2023
'publicKey' => $key,
24+
25+
// Alternatively, you can use automatic discovery as long as your server
26+
// has the <issuer>/.well-known/openid-configuration endpoint.
27+
// This endpoint will then provide all provider settings above, so you only need to provide
28+
// your own clientId, clientSecret, and redirectUri.
29+
// 'issuer' => 'http://example.com/oauth2' // This is not supported by the brentertainment.com service
2130
],
2231
[
2332
'signer' => $signer,

0 commit comments

Comments
 (0)