Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* WordPress Plugin: [https://wordpress.org/plugins/authorizer/][wp]
* Changelog: [https://github.com/uhm-coe/authorizer/blob/master/readme.txt][changelog]

*Authorizer* is a WordPress plugin that restricts access to specific users, typically students enrolled in a university course. It maintains a list of approved users that you can edit to determine who has access. It also replaces the default WordPress login/authorization system with one relying on an external server, such as Google, CAS, LDAP, or an OAuth2 provider. Finally, *Authorizer* lets you limit invalid login attempts to prevent bots from compromising your users' accounts.
*Authorizer* is a WordPress plugin that restricts access to specific users, typically students enrolled in a university course. It maintains a list of approved users that you can edit to determine who has access. It also replaces the default WordPress login/authorization system with one relying on an external server, such as Google, CAS, LDAP, OAuth2, or an OIDC provider. Finally, *Authorizer* lets you limit invalid login attempts to prevent bots from compromising your users' accounts.

*Authorizer* requires the following:

Expand All @@ -12,7 +12,7 @@

*Authorizer* provides the following options:

* **Authentication**: WordPress accounts; Google accounts; CAS accounts; LDAP accounts; OAuth2 accounts
* **Authentication**: WordPress accounts; Google accounts; CAS accounts; LDAP accounts; OAuth2 accounts; OIDC (OpenID Connect) accounts
* **Login Access**: All authenticated users (all local and all external can log in); Only specific users (all local and approved external users can log in)
* **View Access**: Everyone (open access); Only logged in users
* **Limit Login Attempts**: Progressively increase the amount of time required between invalid login attempts.
Expand Down
1 change: 1 addition & 0 deletions authorizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
require_once __DIR__ . '/src/authorizer/options/external/class-google.php';
require_once __DIR__ . '/src/authorizer/options/external/class-cas.php';
require_once __DIR__ . '/src/authorizer/options/external/class-ldap.php';
require_once __DIR__ . '/src/authorizer/options/external/class-oidc.php';

require_once __DIR__ . '/src/authorizer/options/class-advanced.php';

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"require": {
"apereo/phpcas": "^1.3",
"google/apiclient": "^2.7",
"jumbojett/openid-connect-php": "^1.0",
"league/oauth2-client": "^2.6",
"league/oauth2-github": "^2.0",
"thenetworg/oauth2-azure": "^2.0"
Expand Down
46 changes: 44 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion js/authorizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@
$( '.nav-tab-wrapper .nav-tab-external_oauth2' ).toggle( $( '#auth_settings_oauth2' ).is( ':checked' ) );
$( '.nav-tab-wrapper .nav-tab-external_google' ).toggle( $( '#auth_settings_google' ).is( ':checked' ) );
$( '.nav-tab-wrapper .nav-tab-external_cas' ).toggle( $( '#auth_settings_cas' ).is( ':checked' ) );
$( '.nav-tab-wrapper .nav-tab-external_oidc' ).toggle( $( '#auth_settings_oidc' ).is( ':checked' ) );
$( '.nav-tab-wrapper .nav-tab-external_ldap' ).toggle( $( '#auth_settings_ldap' ).is( ':checked' ) );

// Hide some OAuth2 options based on current settings.
Expand Down Expand Up @@ -591,6 +592,11 @@
$( '.nav-tab-wrapper .nav-tab-external_cas' ).toggle( $( this ).is( ':checked' ) );
});

// Event handler: Show/hide OIDC tab based on checkbox
$( 'input[name="auth_settings[oidc]"]' ).on( 'change', function() {
$( '.nav-tab-wrapper .nav-tab-external_oidc' ).toggle( $( this ).is( ':checked' ) );
});

// Event handler: Show/hide LDAP tab based on checkbox
$( 'input[name="auth_settings[ldap]"]' ).on( 'change', function() {
$( '.nav-tab-wrapper .nav-tab-external_ldap' ).toggle( $( this ).is( ':checked' ) );
Expand Down Expand Up @@ -671,7 +677,7 @@
} else if ( sessionStorage.getItem( 'tab' ) ) {
tab = sessionStorage.getItem( 'tab' );
}
if ( $.inArray( tab, [ 'access_lists', 'access_login', 'access_public', 'external', 'external_oauth2', 'external_google', 'external_cas', 'external_ldap', 'advanced' ] ) < 0 ) {
if ( $.inArray( tab, [ 'access_lists', 'access_login', 'access_public', 'external', 'external_oauth2', 'external_google', 'external_cas', 'external_oidc', 'external_ldap', 'advanced' ] ) < 0 ) {
tab = 'access_lists';
}
window.chooseTab( tab, animationSpeed );
Expand Down
Loading