Puppet Class: role::wsoauth

Defined in:
puppet/modules/role/manifests/wsoauth.pp

Overview

Class: role::wsoauth

Provisions the WSOAuth extension, which allows login via OAuth, using accounts at a remote wiki.

Parameters:

  • oauth_uri (Any)
  • oauth_key (Any)
  • oauth_secret (Any)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'puppet/modules/role/manifests/wsoauth.pp', line 5

class role::wsoauth (
    $oauth_uri,
    $oauth_key,
    $oauth_secret,
) {
    ensure_resource('mediawiki::extension', 'PluggableAuth')

    $mediawiki_url = hiera('mediawiki::server_url', '')

    mediawiki::extension { 'WSOAuth':
        needs_update => true,
        composer     => true,
        settings     => {
            wgOAuthAuthProvider => 'mediawiki',
            wgOAuthUri          => $oauth_uri,
            wgOAuthClientId     => $oauth_key,
            wgOAuthClientSecret => $oauth_secret,
            wgOAuthRedirectUri  => "${mediawiki_url}/w/index.php?title=Special:PluggableAuthLogin",
        }
    }

    mediawiki::import::text { 'VagrantRoleWSOAuth':
        source => 'puppet:///modules/role/wsoauth/VagrantRoleWSOAuth.wiki',
    }
}