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

AD FS 2019 issues #106

Open
christophvw opened this issue Oct 5, 2023 · 3 comments
Open

AD FS 2019 issues #106

christophvw opened this issue Oct 5, 2023 · 3 comments

Comments

@christophvw
Copy link

christophvw commented Oct 5, 2023

AD FS returns only the subject claim on /userinfo and userinfo works only when you pass "resource"=> "urn:microsoft:userinfo" on /authorize

So we have to extract the claims from the access_token and do not call the userInfo Url at all in this case.

@christophvw
Copy link
Author

christophvw commented Oct 6, 2023

When I extract the email adress (email = username here) from the token and remove the call to the userinfo endpoint I can login successfully:

$acc_token = json_decode(base64_decode(explode('.', $result->access_token)[1]));
$providerUserId = $acc_token->email

@christophvw
Copy link
Author

christophvw commented Oct 6, 2023

My config:

apache2:
RewriteEngine On
RewriteRule ^/oidc/callback /index.php?module=LoginOIDC&action=callback&provider=oidc [QSA,NE,R,L]

Authorize URL: https://adfs-serverfqdn/adfs/oauth2/authorize
Token URL: https://adfs-serverfqdn/adfs/oauth2/token
Userinfo URL: https://adfs-serverfqdn/adfs/userinfo
Redirect URL: https://matomo-serverfqdn/oidc/callback

Maybe it would be useful to be able to leave userinfo url empty in this case - and when it is empty - try to extract the claim from the token.

@christophvw
Copy link
Author

#110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant