32 Commits (a283a18fec7ebfad7f1b097b4ac162863b4098d1)

Author SHA1 Message Date
Tim Nolte 68f37dbee1
Adds Additional Validation & Fixes Redirect Back URL (#301)
* Adds Additional Validation & Fixes Redirect Back URL
- Adds URL request validation.
- Updates the way the redirect back URL is formed.

* Fixes Redirect URL Logic to Handle Subdirectory Installs
- Handles home page login for redirect back.
- Handles subpages login for redirect back.
- Handles non-permalink sites.

* Refactor Redirect URL Methods to Support All Uses
- Consolidates make_authentication_url & get_authentication_url.
- Fixes redirect client back support for login button and make
  authentication URL.
4 years ago
Tim Nolte 8a963301ab
Fixes Broken Redirect URL Handling & Moves Away from Cookies (#289)
* Initial Changes to Move Away from Cookies for Redirects

* Add Redirection via State Transient Support

- Adds adding the login redirection to the state transient.
- Deprecates the use of cookies to handle login redirection.
- Fixes Login button shortcode authentication URL encoding.
- Fixes some broken wp-env local Docker environment issues.
- Fixes make_authentication_url attributes usage.
- Removes error_log calls used for debugging.

* Fixes Missed WordPress Coding Standards Issues

- Updates PHP_CodeSniffer configuration to properly support all checks.

* Fixes Login Button Output for Proper Escaping
4 years ago
Tim Nolte b3c7b70c13
3.8.0 Release (#230)
* Initial Coding Standards & Static Analysis Chanages.
* Adds WordPress coding standards configuration.
* Adds WordPress/PHP static analysis configuration.
* Adds Git hooks to enforce checks and ensure quality on commits.
* Adds initial local Docker development environment setup.
* Current state of coding standards and analysis fixes.
* Near Completion Update of PHP Code Sniffer Compliance Changes.
* Fixes all PHP Code Sniffer WordPress Coding Standards Issues.
* Updates Code Base to Pass Level 5 Baseline
* Ensures PHP Code Sniffs continue to pass.
* Fixes all code base issues to pass a level 5 PHP static analysis.
* Updates PHPStan configurations to use a level 5 baseline.
* Fixes Travis CI Configuration for Static Analysis
* Fixes Plugin Pass i18n Checks
* Adds i18n check to Travis CI builds.
* Adds additional i18n run scripts to package.json.
* Internationalization Checking & Fixes
* Fixes missing i18n translation in main plugin file.
* Adds update POT file.
* Enforces i18n checks on commit with GrumPHP.
* Adds i18n check step to Travis CI builds.
* Gitattributes for export exclusions
* Fixes missing loaded settings property assignment.
* Adds Support for IDP Settings as Defined Constants
    - Reads from defined constants on plugin bootstrap.
    - Disabled plugin settings fields when defined constants are used.
    - Prevents savings plugin settings that are using defined constants.
* Adds Node/NPM Environment Requirements
* Fixes GrumPHP Bin Directory Configuration
* Updates GrumPHP for Required Features
    - Bumps Composer package PHP version to 7.3.
    - Updates GrumPHP configuration to new format.
* Plugin Settings Page Updates Using Constants
    - Ensures that any available defined constants are loaded in place of any database stored settings as an override.
* Composer Dependency Updates & Travis CI Caching Fix
* Travis CI Build Composer Update Change
* NPM Updates & NVM Version Lock
* Fixes NPM Package Lock File for Node v12
* Updates NPM Package Dependencies
* Updates Changelog & README Files With Relevant Changes
* Fixes Localizaion on Error Output
* Changes GrumPHP Configuration to Provide a Full PHPCS Report
* Fixes Local Dev Setup to Activate Plugin by Default
* Adds Contribution Guide and Issue & PR Templates (#222)
* Fixes Support GitHub Issue Template (#223)
* Fixes space/typo with Wiki link (#224)
* Fixes invalid wp-env plugin configuration (#225)
* Improve Local Dev Setup by Reducing Setup Commands (#226)
* Improve Local Dev Setup by Reducing Setup Commands
* Adds Code Owners Configuration for Pull Requests
* Fixes Development Dependencies and Setup Scripts (#227)
* Dev release/3.8 (#229)
* Adds dev Branch to Travis CI Builds
* Release Preparation Enhancements & Release Changes

Co-authored-by: Jonathan Daggerhart <jonathan@daggerhart.com>
4 years ago
Tim Nolte 107a066bd5
Add Redirect & Override Attributes Support to Shortcodes.
* Adds support for setting the redirect cookie when shortcodes are used.
* Adds support for overriding some attributes for authentication URLs
  and login buttons when using the shortcodes.
* Fixes code formatting.
5 years ago
Jonathan Daggerhart bf2e517a89 removing trailing whitespace 5 years ago
Rob Skilling 836500a495 Increase detail of state token errors
Before: a missing state error could be returned for 3 reasons: a token was not provided, the token provided was invalid, or the token provided had expired.

There was no way of knowing which of these was the cause of any single missing state error.

Now: if no token is provided, a missing state error is returned, and the "openid-connect-generic-no-state-provided" action is called.

If the token provided is invalid, an "Invalid state" error is thrown and the "openid-connect-generic-state-not-found" action is called.

If the token provided has expired, an "Invalid state" error is returned and the "openid-connect-generic-state-expired" action is called.

This should allow for more granular error logging around state token errors.
5 years ago
James Collier 8237aa5b84 RFC 3986 encode parameters in authentication URL 5 years ago
Simon Costea 0940c8c863 Delete expired transients 5 years ago
SYLVAIN PAILLASSE 11695f56ab Add logger to OpenID_Connect_Generic
(also remove code parameter value in the query stirng url for better reading of the logs)
5 years ago
Jonathan Daggerhart 96bb449f39 Fix race condition by replacing states option array with individual transients 5 years ago
Gassan Gousseinov 11e89fd9b2 fix stripos call 6 years ago
Jonathan Daggerhart 6dfb0fafa5
Issue #76: Avoid double question marks in auth url query string (#120) 6 years ago
Shane Mulligan 0b51e9c1e5 Change PHP keywords to comply with PSR2 (#116)
Signed-off-by: CodeLingoBot <bot@codelingo.io>
6 years ago
Jonathan Daggerhart 4d7939e9e5
Bug with some special char in the firstname or lastname
Add str_replace because token is encoded in base64 URL (and not just base64).
Solves the problem with some special char
Re: #101
6 years ago
Jonathan Daggerhart 0d4e4bd006 additional error detection on user_claim 6 years ago
Matt Varblow 6917df262f Allow identity providers which do not support the userinfo endpoint. (#100)
* Allow identity providers which do not support the userinfo endpoint.

* Fixed empty check for userinfo endpoint
6 years ago
Antti Leppä 56bd5718e6 Feature #68 state time limit option (#69)
* Added an option for state time limit on the settings page
7 years ago
Robbie Paul 69a431793f Authentication URL can be modified
Some OpenID Connect providers offer additional functionality by adding
query params to the authentication URL

For example with Azure Active Directory if you pass in
`&domain_hint=REALM` you can customise the way the login screen looks
with your corporate logo etc
8 years ago
Jonathan Daggerhart 61c549189c adding port to the request headers per issue #30 8 years ago
Jonathan Daggerhart 14133138a7 some method annotation corrections, and minor settings page typoes 8 years ago
Jonathan Daggerhart 4866765768 Merge pull request #25 from ahatherly/master
Set the Host header on http requests to openid-connect endpoint
8 years ago
Adam Hatherly 2281246816 Set the Host header on http requests to openid-connect endpoint so it works behind a reverse proxy 8 years ago
Jonathan Daggerhart 6e9790c221 adding comments on new functions 8 years ago
Jonathan Daggerhart fede005f1f fix autoloader for diff environments, use wp_remote_post instead of ‘get’, and move cookie setting to hook init 8 years ago
Raif Atef a47f6d2bfc Refresh tokens when needed instead of logging out when access_token expires.
- refresh_token + access_token expiry is sent via encrypted cookie to the browser.
- If cookie is missing or invalid, user is logged out.
- If last access token expired, use refresh token to fetch a new one and send a new cookie.
- If token refresh fails, user is logged out.
- Cookie encryption is with per-user random key stored in user meta.
- Encryption and key generation done using https://github.com/defuse/php-encryption
- Updated autoloader function to support loading namespaced classes.
8 years ago
Raif Atef d8a043a6c7 Make token_type check in validate_token_response case-insensitive (Fixes issue #15). 8 years ago
wgengarelly 08d9f58d0d When requesting userinfo, send the access token using the Authorization header field as recommended in section 5.3.1 of the specs. 9 years ago
daggerhart 4db956c119 bug: wrong variable as error data 9 years ago
Jonathan Daggerhart ada93ba4f3 Added setting for http_response_timeout 9 years ago
Jonathan Daggerhart 9b2dd29659 Method comments, and unique errors 10 years ago
Jonathan Daggerhart c646078421 refactoring some internal settings for clarity 10 years ago
Jonathan Daggerhart 2e3167fa20 major refactor to separate responsibility 10 years ago