Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include issuer finding in Discovery #2

Open
jumbojett opened this issue Apr 25, 2013 · 1 comment
Open

Include issuer finding in Discovery #2

jumbojett opened this issue Apr 25, 2013 · 1 comment
Assignees

Comments

@jumbojett
Copy link
Owner

There are two steps to discovery:

  1. figuring out which "issuer" to use for a given user
  2. figuring out the configuration once you have the issuer

One way of supporting this feature is utilizing an account chooser.

  1. look for the "iss" parameter on a login page for your issuer
  2. once you have that, you can get the configuration, and go
    it's particularly useful if you're logging in using multiple issuers

Server discovery in Java
https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/blob/master/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/ThirdPartyIssuerService.java

  • Effectively, if it gets an "iss" parameter, it uses that as the issuer.
    If it doesn't, it redirects you to the account chooser URL
    This gets tied into the rest of the client filter that does the heavy lifting.
@ghost ghost assigned jumbojett Apr 25, 2013
@identitymonk
Copy link

yes in fact, when constructed, the OpenID Connect configuration ask for the base provider URL to which it automatically add the /.well-known/openid-configuration suffix. Then the $wellKnown value is loaded with all the openid server properties, including the issuer url.

Then in the function verifyJWTClaims the return value should be:

return (($claims->iss == $this->wellKnow->issuer)
&& (($claims->aud == $this->clientID) || (in_array($this->clientID, $claims->aud)))
&& ($claims->nonce == $this->getNonce())
&& ( !isset($claims->exp) || $claims->exp >= time())
&& ( !isset($claims->nbf) || $claims->nbf <= time())
&& ( !isset($claims->at_hash) || $claims->at_hash == $expecte_at_hash )

and not:

return (($claims->iss == $this->getProviderURL())
&& (($claims->aud == $this->clientID) || (in_array($this->clientID, $claims->aud)))
&& ($claims->nonce == $this->getNonce())
&& ( !isset($claims->exp) || $claims->exp >= time())
&& ( !isset($claims->nbf) || $claims->nbf <= time())
&& ( !isset($claims->at_hash) || $claims->at_hash == $expecte_at_hash )

Cause the providerURL can be very different of the issuerURL.

JF

azmeuk pushed a commit that referenced this issue Nov 20, 2021
update from remote base master
piuma added a commit to piuma/OpenID-Connect-PHP that referenced this issue Nov 8, 2023
…ric_prefix) of type string is deprecated
mstrey added a commit to mstrey/OpenID-Connect-PHP that referenced this issue Apr 12, 2024
Changed parameter jumbojett#2 of http_build_query to empty string
hexmode pushed a commit to hexmode/OpenID-Connect-PHP that referenced this issue Apr 20, 2024
Changed parameter jumbojett#2 of http_build_query to empty string
hexmode pushed a commit to hexmode/OpenID-Connect-PHP that referenced this issue Apr 20, 2024
Changed parameter jumbojett#2 of http_build_query to empty string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants