Skip to content

Commit 813dd8c

Browse files
committed
Add some documentation in README
1 parent 5477631 commit 813dd8c

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ $signer = new \Lcobucci\JWT\Signer\Rsa\Sha256();
1818
$provider = new \OpenIDConnectClient\OpenIDConnectProvider([
1919
'clientId' => 'demoapp',
2020
'clientSecret' => 'demopass',
21-
// the issuer of the identity token (id_token) this will be compared with what is returned in the token.
22-
'idTokenIssuer' => 'brentertainment.com',
2321
// Your server
24-
'redirectUri' => 'http://example.com/your-redirect-url/',
22+
'redirectUri' => 'http://example.com/your-redirect-url/',
23+
24+
// Settings of the OP (OpenID provider)
25+
// The issuer of the identity token (id_token) this will be compared with what is returned in the token.
26+
'idTokenIssuer' => 'brentertainment.com',
2527
'urlAuthorize' => 'http://brentertainment.com/oauth2/lockdin/authorize',
2628
'urlAccessToken' => 'http://brentertainment.com/oauth2/lockdin/token',
2729
'urlResourceOwnerDetails' => 'http://brentertainment.com/oauth2/lockdin/resource',
2830
// Find the public key here: https://github.com/bshaffer/oauth2-demo-php/blob/master/data/pubkey.pem
2931
// to test against brentertainment.com
30-
'publicKey' => 'file:///myproj/data/public.key',
32+
'publicKey' => 'file:///myproj/data/public.key',
33+
34+
// Alternatively, you can use automatic discovery as long as your server
35+
// has the <issuer>/.well-known/openid-configuration endpoint
36+
'issuer' => 'http://example.com/oauth2'
3137
],
3238
[
3339
'signer' => $signer

0 commit comments

Comments
 (0)