Skip to content

Commit 57f2407

Browse files
committed
Add some documentation in README
1 parent 617c016 commit 57f2407

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

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

0 commit comments

Comments
 (0)