Commit Graph

64 Commits (ef6fac4e41e86c53e159be9f1c81dfff1978af3b)

Author SHA1 Message Date
Raphaël Droz f3096b6f14 fix a notice: If using traditional login, $token_response may be empty ()
fix a 404: In Bedrock-like layout configuration, $redirect_url === 'wp-login.php?loggedout=true'
 (which work for local redirection). But canonicalization should take into account the additional /wp/
 prefix. site_url() does meanwhile home_url() does not.
Raphaël Droz f9c076a5c0 hook: ability to filter claim and derived user data ()
Raphaël Droz 6263bee23b google provider: do not attempt to use their not-compliant /revoke endpoint ()
Raphaël Droz 58c8b7ac9a disconnect hook: get user meta from information provided by filter parameters ()
Raphaël Droz d0b79313c2 fixed a notice when cookie does not contain expected redirect_url ()
Raphaël Droz 756c3c05a1 Translit names' special characters ()
When nickname is generated from a full name, intent to translit them to ascii instead of stripping special characters.
Antti Leppä 56bd5718e6 Feature state time limit option ()
* Added an option for state time limit on the settings page
Jonathan Daggerhart a99280600a removed generic wp filter used for request timeout
Jonathan Daggerhart 326efbb416 prefixing generic classes with oidcg comment class names. adjusting autoloading to look for the standardized prefix.
PJ Eby b14554e8fe WP still supports PHP 5.2.4 :(
PJ Eby 662e9fb25b Track refresh token expiration (fixes )
PJ Eby caf1324499 Defer logouts to after all WP plugins initialize
PJ Eby 134d0116b8 Drop unnecessary user_meta keys
PJ Eby 7879835b49 Store refresh token in sessions, instead of a cookie
Sven van Hal 3869aa0fde
Terminate authentication_request_callback() after execution
Jonathan Daggerhart 08af84a851 readme and changelog updates. minor whitespace update.
Jonathan Daggerhart 3683cd3286 Merge pull request from daggerhart/redirect-on-logout-as-setting
New setting to determine if users should be redirected when session expires.
Jonathan Daggerhart c73d9f6956 new setting allows administrator to determine if users should be redirected when their acces token expires.
skidos 059d672de2 Update openid-connect-generic-client-wrapper.php
Add id_token_hint to end session logout redirect url 
http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
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
Robbie Paul 82162ec753 Escape the error message
* This commit prevents a possible reflected XSS
Robbie Paul 672d7292e2 Include wp_login action after auth cookie is set
* Many plugins will hook in to this action, it should be at the end of any
  WordPress login flow
* See: https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/user.php#L104
Jonathan Daggerhart 61c549189c adding port to the request headers per issue
Jonathan Daggerhart 14133138a7 some method annotation corrections, and minor settings page typoes
Moriyoshi Koizumi 0bbfc3437f More flexible identity settings.
Jonathan Daggerhart 4866765768 Merge pull request from ahatherly/master
Set the Host header on http requests to openid-connect endpoint
Adam Hatherly 2281246816 Set the Host header on http requests to openid-connect endpoint so it works behind a reverse proxy
Jonathan Daggerhart e7f390477c fixing error on php 5.4
Jonathan Daggerhart 14d0ec44f6 Allow for the use of an alternate authentication route (redirect_uri) as opposed to the default admin-ajax method
Jonathan Daggerhart 0dc448fee5 clean up autoloader, default settings values, and validate refresh token result before attempting response
Jonathan Daggerhart aafb5f7a2c minor logger and settings page documentation improvements
Jonathan Daggerhart 6e9790c221 adding comments on new functions
Raif Atef 69930fcd3c OpenID Connect end_session_endpoint integrated logout support.
Jonathan Daggerhart 0f2d8fc5a8 moving auto login redirect to a method that fires during hook init
Raif Atef c377e50cfa In case of an error redirect and auto sso, keep the openid connect button and hide the login form.
Jonathan Daggerhart fede005f1f fix autoloader for diff environments, use wp_remote_post instead of ‘get’, and move cookie setting to hook init
Raif Atef 38f78cc274 If IdP doesn't issue a refresh token, expire the session when the access token expires.
Raif Atef 2ff33dba41 Move redirect cookie set earlier to save origin on error redirect and clear it during the redirect.
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.
Raif Atef d8a043a6c7 Make token_type check in validate_token_response case-insensitive (Fixes issue ).
wgengarelly 257216e148 Added [openid-connect-generic-update-user-using-current-claim] action hook allowing other plugins/themes
to take action using the fresh claims received when an existing user logs in.
wgengarelly 08d9f58d0d When requesting userinfo, send the access token using the Authorization header field as recommended in section 5.3.1 of the specs.
Robert Staddon db32baa60e Allow users to login with WP account after using OpenID Connect
Resolve a bug that prevented users from logging in with their WordPress
credentials after having logged in via OpenID Connect.
Robert Staddon f5c5ff8908 Add an action hook before the redirect
Robert Staddon 74153ec363 Support "redirect_to" parameter on login page
Robert Staddon 6cd6cc126a Record the URL of the current page when creating a login button
Robert Staddon 398612eaf1 Redirect to origin page instead of home page if setting enabled
To know the origin page URL, read the value of a cookie that was set
when the button was created.
Robert Staddon 6b5d6a9782 Add "Redirect Back to Origin Page" setting
This setting would override the default action of redirecting the user
to the home page after a successful login and instead redirect the user
back to the page on which they clicked the OpenID Connect login button.
This would cause the login process to proceed in a traditional WordPress
fashion.
Robert Staddon 669e3b8030 Add shortcode for login button
[openid_connect_generic_login_button]
Robert Staddon 9371b8132f Only link existing users if the setting is enabled