bshaffer / oauth2-server-php-docs

documentation for the oauth2-server-php library
231 stars 148 forks source link

Improve OpenID Documentation #74

Open biwerr opened 8 years ago

biwerr commented 8 years ago

Please add to the openID documentation, that you musst add a new grant type

$config['use_openid_connect'] = true; $config['issuer'] = 'brentertainment.com'; $server = new OAuth2\Server($config); $server->addGrantType(new OAuth2\OpenID\GrantType\AuthorizationCode($storage));

bshaffer commented 6 years ago

This line of code should not be necessary. As long as use_openid_connect is true, the grant type above will automatically be added to the server object.

It's possible somewhere else in your code explicitly sets the grant types, and so getDefaultGrantTypes is never called, or something along these lines. Could you paste a full repro case here?

biwerr commented 6 years ago

Yes I set the GranTypes as mentioned in your Documentation

ghost commented 6 years ago

I'm currently following the this documentation to implement the OpenID connect, but I'm running into a few issues:

  1. It is not mentioned that a UserClaimsInterface implementation also needs to be provided.
  2. The documentation seems to mix a response_type=code request with an response_type=id_token response.
  3. I'm unsure why a public / private keys are needed with the id_token flow. A signed id_token is stored in the authorisation code table, but is not sent over the internet.
  4. Although fairly simple to work out, the UserInfoController is not documented.
  5. As mentioned earlier, using just using OAuth2\GrantType\AuthorizationCode instead of adding OAuth2\OpenID\GrantType\AuthorizationCode.