### PluggableAuth Sync All Group Sync Example Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md A basic example demonstrating the configuration of the 'syncall' group synchronization mechanism for a PluggableAuth plugin. It shows how to set the type to 'syncall' within the groupsyncs configuration. ```php $wgPluggableAuth_Config['example'] = [ 'plugin' => 'ExampleAuthPlugin', 'data' => [ // ... ], 'groupsyncs' => [ 'default' => [ 'type' => 'syncall' ] ] ]; ``` -------------------------------- ### PluggableAuth Mapped Group Sync Example Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md An example illustrating the configuration of the 'mapped' group synchronization mechanism. It includes a 'map' array to define how external group attributes map to wiki groups. ```php $wgPluggableAuth_Config['example'] = [ 'plugin' => 'ExampleAuthPlugin', 'data' => [ // ... ], 'groupsyncs' => [ 'default' => [ 'type' => 'mapped' 'map' => [ 'group1' => [ 'groupAttr' => 'value1' ], 'group2' => [ 'groupAttr' => 'value2' ], 'group3' => [ 'groupAttr' => 'value3' ] ] ] ] ]; ``` -------------------------------- ### OpenIDConnect Basic Configuration Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md Provides a basic PHP configuration example for the OpenIDConnect MediaWiki extension. It sets up the issuer, client ID, and defines mappings for global and wiki-specific roles from the JWT payload to MediaWiki groups. ```php $wgOpenIDConnect_Config[''] = [ 'clientID' => '...', // ... 'global_roles' => [ 'property' => ['realm_access', 'roles'], 'prefix' => 'global' ], 'wiki_roles' => [ 'property' => ['resource_access', 'wiki', 'roles'] ] ]; ``` -------------------------------- ### WSOAuth Auto-Populate Groups Configuration Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md Shows how to configure the WSOAuth MediaWiki extension using the PluggableAuth framework. This example enables automatic population of user groups based on roles specified in the 'autopopulategroups' data element and defines a group synchronization rule. ```php $wgPluggableAuth_Config["WSOAuth Log In"] = [ 'plugin' => 'WSOAuth', 'data' => [ // ... 'autopopulategroups' => [ 'roles' => [ '', '', '' ] ] ], 'groupsyncs' => [ 'sync' => [ 'type' => 'syncall', 'groupattributename' => 'roles' ] ] ]; ``` -------------------------------- ### PluggableAuth Configuration Structure Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md Defines the basic structure for configuring PluggableAuth plugins, including plugin-specific data and group synchronization settings. This serves as a template for plugin configuration arrays. ```php $wgPluggableAuth_Config[''] = [ 'plugin' => '', 'data' => [ // ... ], 'groupsyncs' => [ '' => [ 'type' => '', // ... ] ] ]; ``` -------------------------------- ### OpenIDConnect Group Synchronization Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md Demonstrates configuring group synchronization for the OpenIDConnect extension within the PluggableAuth framework. It specifies the plugin, synchronization type ('syncall'), a prefix for generated group names, and the paths within the JWT to extract group roles. ```php $wgPluggableAuth_Config['Log in with OIDC'] = [ 'plugin' => 'OpenIDConnect', 'data' => [ // ... ], 'groupsyncs' => [ 'mysync' => [ 'type' => 'syncall', 'filterPrefix' => 'oidc_', 'groupAttributeName' => [ [ 'path' => ['realm_access', 'roles'] ], [ 'path' => ['resource_access', 'wiki', 'roles'] ] ] ] ] ]; ``` -------------------------------- ### OpenIDConnect JWT Role Mapping Source: https://github.com/wikimedia/mediawiki-extensions-pluggableauth/blob/master/docs/GroupSync.md Illustrates the structure of a JWT payload used by OpenIDConnect for role synchronization. It shows how 'realm_access' and 'resource_access' properties within the JWT contain arrays of roles that can be mapped to MediaWiki groups. ```json { "typ": "Bearer", ... "realm_access": { "roles": [ "admin", "jedi_master" ] }, "resource_access": { "wiki": { "roles": [ "editor", "admin" ] }, "other.client": { "roles": [ "manage-account", "manage-account-links", "view-profile" ] } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.