Add Entra group restriction, button-only mode and detailed README
Groups: a Graph-backed picker on the Security tab (search by name or paste object IDs) stores allowed group IDs. During sign-in membership is read from the ID token's groups claim when present, otherwise verified through Microsoft Graph checkMemberGroups (transitive). Verification failures refuse the sign-in. Button-only mode: hides the password form and the lost-password link and rejects password sign-ins on wp-login.php via the authenticate filter. A generated, rate-limited fallback key re-enables the form for 30 minutes per browser; M365_LOGIN_DISABLE_BUTTON_ONLY switches the mode off from wp-config.php. Also: new German-language README with sequence diagram, settings reference, troubleshooting and hook examples; readme.txt external services section now covers Microsoft Graph; translations updated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJxAHYdMfKPoN4koRc4Ci2
This commit is contained in:
parent
1517e7e3bc
commit
1202283eda
20 changed files with 2241 additions and 517 deletions
|
|
@ -33,6 +33,13 @@ final class M365_Login {
|
|||
*/
|
||||
public $auth;
|
||||
|
||||
/**
|
||||
* Microsoft Graph client.
|
||||
*
|
||||
* @var M365_Login_Graph
|
||||
*/
|
||||
public $graph;
|
||||
|
||||
/**
|
||||
* Login button component.
|
||||
*
|
||||
|
|
@ -66,11 +73,12 @@ final class M365_Login {
|
|||
add_action( 'init', array( $this, 'load_textdomain' ) );
|
||||
|
||||
$this->settings = new M365_Login_Settings();
|
||||
$this->auth = new M365_Login_Auth( $this->settings );
|
||||
$this->graph = new M365_Login_Graph( $this->settings );
|
||||
$this->auth = new M365_Login_Auth( $this->settings, $this->graph );
|
||||
$this->button = new M365_Login_Button( $this->settings );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$this->admin = new M365_Login_Admin( $this->settings, $this->auth );
|
||||
$this->admin = new M365_Login_Admin( $this->settings, $this->auth, $this->graph );
|
||||
}
|
||||
|
||||
add_filter( 'plugin_action_links_' . plugin_basename( M365_LOGIN_FILE ), array( $this, 'action_links' ) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue