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

AzureResourceOwner and OID #1956

Open
schugs4 opened this issue Sep 26, 2023 · 1 comment
Open

AzureResourceOwner and OID #1956

schugs4 opened this issue Sep 26, 2023 · 1 comment
Labels

Comments

@schugs4
Copy link

schugs4 commented Sep 26, 2023

Q A
Bug? yes
New Feature? no
Support question? no
Version 2.x

Actual Behavior

when using Azure Resource owner, and using OpenID. The information from the id_token removes user information from the infos_url.

Expected Behavior

Need to keep both data sets.

Steps to Reproduce

    microsoft:
        type:                azure
        scope: 'openid profile email'

Possible Solutions

i have this code at the end of the AzureResourceOwner::getUserInformation()

    $jwt = base64_decode($jwt);

    $response = parent::getUserInformation($accessToken, $extraParameters);
    try {
        $tid_data = json_decode($jwt, true, 512, \JSON_THROW_ON_ERROR);
    } catch (\JsonException $exception) {
        throw new AuthenticationException('Response is not a valid JSON code.');
    }
    $response->setData(array_merge($tid_data,$response->getData()));

    return $response;

related, the info's URL has been updated when using OpenId, this is easy enough to override in the config settings, but the new infos_url is https://graph.microsoft.com/oidc/userinfo/. Also, the paths in the oidc are "givenname" and "familyname" withouth the "_" from legacy URLs. I can do a pull request, but wanted some thoughts on how others are handling OpenID with id_tokens as well as info URLS.

Copy link

Message to comment on stale issues. If none provided, will not mark issues stale

@github-actions github-actions bot added the Stale label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant