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

added define config with OIDC_LOGIN_TYPE and OIDC_CLIENT_SCOPE #256

Merged
merged 9 commits into from
Feb 25, 2022

Conversation

matchaxnb
Copy link

@matchaxnb matchaxnb commented Jan 8, 2021

All Submissions:

Changes proposed in this Pull Request:

I add here support for define() settings for two variables: login_type and scope.

OIDC_CLIENT_SCOPE is a space-separated list of scopes.
OIDC_LOGIN_TYPE can either be button or auto. Other values have undefined behaviour.
OIDC_ENFORCE_PRIVACY (boolean): enable/disable the eponymous option
OIDC_CREATE_IF_DOES_NOT_EXIST (boolean) enable/disable the eponymous option
OIDC_LINK_EXISTING_USERS (boolean) enable/disable the eponymous option
OIDC_REDIRECT_USER_BACK (boolean) enable/disable the eponymous option
OIDC_REDIRECT_ON_LOGOUT (boolean) enable/disable the eponymous option

How to test the changes in this Pull Request:

  1. set define('OIDC_CLIENT_SCOPE', 'email openid profile') in your wp-config.php
  2. see it shows up in the config and the variable is read-only
  3. do the same for OIDC_LOGIN_TYPE and the other variables.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Added seven new environment variables matching the options in the settings page.
Setting these defines disables changing the options in the interface.

OIDC_CLIENT_SCOPE: a space-separated list of scopes.
OIDC_LOGIN_TYPE: (button|auto)
OIDC_ENFORCE_PRIVACY (boolean): enable/disable the eponymous option
OIDC_CREATE_IF_DOES_NOT_EXIST (boolean) enable/disable the eponymous option
OIDC_LINK_EXISTING_USERS (boolean) enable/disable the eponymous option
OIDC_REDIRECT_USER_BACK (boolean) enable/disable the eponymous option
OIDC_REDIRECT_ON_LOGOUT (boolean) enable/disable the eponymous option

scopes are needed when logging in so this is a no-brainer and this
can be deployed using deployments

login type can be defined here when you want to enforce SSO from the
deployment.
@matchaxnb
Copy link
Author

Hi there, the tests have failed but I have no idea why. It's a straight branch from develop and the changes are really minor.

@matchaxnb
Copy link
Author

/travis_retry

@matchaxnb matchaxnb closed this Jan 12, 2021
@matchaxnb matchaxnb reopened this Jan 12, 2021
@matchaxnb
Copy link
Author

opening a new issue.

@timnolte timnolte self-assigned this Jan 12, 2021
@timnolte timnolte added enhancement Issues & PRs related to new features. status: needs review PR that needs review. labels Jan 12, 2021
@timnolte
Copy link
Collaborator

@ChloeTigre your PR is passing now. Will take a deeper look and consider it for inclusion in the next 3.9 feature release.

Copy link
Collaborator

@timnolte timnolte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChloeTigre comments made some changes are required. Thanks!

includes/openid-connect-generic-settings-page.php Outdated Show resolved Hide resolved
openid-connect-generic.php Show resolved Hide resolved
openid-connect-generic.php Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
@matchaxnb
Copy link
Author

Yes doing that!

@matchaxnb
Copy link
Author

There :) thanks.

@timnolte timnolte added this to the 3.9 Release milestone Jan 20, 2021
@timnolte timnolte added this to To do in 3.9.0 Release Jan 30, 2021
@timnolte timnolte moved this from To do to In progress in 3.9.0 Release Jan 30, 2021
@matchaxnb
Copy link
Author

Hey there ! I have no time to care for the README.md change and I am unsure of the desired styling. Can someone take care of this? I'd like to get this merged but it's out of my professional scope at the moment.

@timnolte timnolte added status: approved PRs that have been approved and ready to be merged. and removed status: needs review PR that needs review. labels Feb 25, 2022
@timnolte timnolte merged commit 195c5a0 into oidc-wp:dev Feb 25, 2022
@timnolte timnolte moved this from In progress to Done in 3.9.0 Release Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues & PRs related to new features. status: approved PRs that have been approved and ready to be merged.
Projects
No open projects
3.9.0 Release
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants