jumbojett / OpenID-Connect-PHP

Minimalist OpenID Connect client

Home Page:https://github.com/jumbojett/OpenID-Connect-PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getAccessTokenPayload - Returns null with Azure OIDC

CodyRWhite opened this issue · comments

I am not sure if this is a bug.

I am using another product that leverages this module, however when I try and call getAccessTokenPayload() from your module I am receiving a null response.

The authentication process completes without issue so I know I am able to authenticate. However the product I am using stores the payload in order to process other elements.

It appears this works with other OIDC providers, but not Azure. I do not have any other providers to verify with.

What I am able to debug.

$oidc = new OpenIDConnectClient....

After the $oidc->authenticate()

If I var_dump($oidc) I can see all the data including a value under
"accessToken":"protected" ]=> string(2308)"eyJ0eXAiOiJKV1Qi..................

When I try and var_dump($oidc->getAccessTokenPayload()) I am receiving a blank/null value.

I am willing to debug further to get this to work, however I am not sure where to go next.

enter your jwt to https://jwt.io/ and you can see what is really inside the Azure token.

everything is working fine sorry for the alert/confusion.
User error :)