You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-19Lines changed: 44 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.net/) or [SMF forum](https://www.simplemachines.org/) to be automatically signed in if they are of the appropriate usergroup while logged into the forum.
1
+
This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.net/) or [SMF forum](https://www.simplemachines.org/) to be automatically signed in if they are of the appropriate user group while logged into the forum.
2
2
3
3
---
4
4
# Branches
@@ -8,7 +8,30 @@ This MediaWiki extension allows users in an [Elkarte Forum](https://www.elkarte.
8
8
| mw139 | 1.39 | 1.0,1.1 | 2.0,2.1 |
9
9
| mw135 | 1.35 | 1.0,1.1 | 2.0,2.1 |
10
10
11
-
----
11
+
12
+
# Install
13
+
## Manual
14
+
Download the repository as a zip extract to extensions/ForumSsoProvider
15
+
16
+
## Git
17
+
If your MediaWiki install follows your internal git repository, you can add this as a sub-module
We are listed on [packagist](https://packagist.org/packages/simplemachines/forum-sso-provider) and can be installed using composer. Any changes you make to files here may be lost during updates.
To use, the contents of the ForumSsoProvider directory need to be placed into extensions/ForumSsoProvider. It is then loaded using the 'new' plugin loading method in LocalSettings.php:
14
37
@@ -25,11 +48,11 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
25
48
$wgFSPSoftware = 'smf2.1';
26
49
27
50
# Optional LocalSettings
28
-
### Login Groups - Users in this group are signed into MediaWiki. SMF does not have a real group for "Regular" members, it is a pseudo group. Additionally, Local Moderators (Group ID 3) is a special group. Users are only in this group when they are on a board they have been granted moderator permissions on. If you do not specify this, users are granted permission to the wiki by default. If you specify this, users must be in the associated groups to have access to the wiki.
51
+
### Login Groups - Users in this group are signed into MediaWiki. SMF does not have a real group for "Regular" members; it is a pseudo group. Additionally, Local Moderators (Group ID 3) are a special group. Users are only in this group when they browse the board they were granted moderator permissions. If you do not specify this, users are granted permission to the wiki by default. If you specify this, users must be in the associated groups to have access to the wiki.
29
52
30
53
$wgFSPAllowGroups = array(5);
31
54
32
-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
55
+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki; this is a deny group and takes over the login group.
33
56
34
57
$wgFSPDenyGroups = array(4);
35
58
@@ -51,7 +74,7 @@ All settings should be defined prior to calling `wfLoadExtension('ForumSsoProvid
51
74
11 => 'Custom_Wiki_group',
52
75
);
53
76
54
-
### Ban checks - Enable checking against bans in SMF. If found it prevents access to MediaWiki.
77
+
### Ban checks - Enable checking against bans in SMF. If found, it prevents access to MediaWiki.
55
78
56
79
$wgFSPEnableBanCheck = true;
57
80
@@ -84,7 +107,7 @@ These settings are used by the legacy Auth_SMF.php.
84
107
85
108
$wgSMFGroupID = array(2);
86
109
87
-
### Deny Groups - Prevent users in these groups from being signed into MediaWiki, this is a deny group and takes over the login group.
110
+
### Deny Groups - Prevent users in these groups from being signed into MediaWiki; this is a deny group and takes over the login group.
88
111
89
112
$wgSMFDenyGroupID = array(4);
90
113
@@ -119,39 +142,42 @@ Finding your SMF Group ID
119
142
1. Navigate to the Admin Control Panel
120
143
2. Click on Membergroups
121
144
3. Click Modify on the group you are looking for.
122
-
4. In the address bar, you will see `group=####`, this number is the group id.
145
+
4. In the address bar, you will see `group=####`, this number is the group ID.
123
146
124
147
Working with Arrays
125
148
---------------
126
149
The configuration file uses basic PHP code.
127
150
128
-
When you have a single member for the array, you simply just wrap it in the array statement
151
+
When you have a single member for the array, you can wrap it in the array statement.
129
152
$code = array(1);
130
153
131
-
132
154
If you have 2 members that need to go into the array, use a comma to separate them.
133
155
$code = array(1,2);
134
156
135
-
For strings, wrap them in quotes. SMF coding style recommends using single quotes unless necessary. Double quotes signal the PHP parser to use special handling, which might interpret variables and other logic inside the string. This is typically not necessary in the configuration.
157
+
When you have strings, wrap them in quotes. SMF coding style recommends using single quotes unless necessary. Double quotes signal the PHP parser to use special handling, which might interpret variables and other logic inside the string. This is typically not necessary in the configuration.
136
158
$code = array('my string');
137
159
138
-
You may also see the shorthand square brackets to refer to arrays. This is valid as well, but not used in the configuration for simplificy.
160
+
You may also see the shorthand square brackets to refer to arrays.
139
161
$code = ['my string'];
140
162
141
163
Extension Troubleshooting
142
164
---------------
143
165
144
-
Set $wgDebugLogFile in your LocalSettings.php:
166
+
1.Set $wgDebugLogFile in your `LocalSettings.php`:
Search for ForumSessionProvider and it will tell you what it is thinking.
149
169
150
-
This bloats pretty quickly, so you'll want to comment it out after you have resolved your problem.
170
+
2. Trigger the URL either yourself or the member you are debugging.
171
+
172
+
3. Search the file for ForumSessionProvider.
173
+
174
+
4. The messages will indicate how it is processing the authorization.
175
+
176
+
This grows quickly and uses up storage space. You can delete the file, and it will be recreated again.
151
177
152
178
Wiki Troubleshooting
153
179
---------------
154
-
MediaWiki has builtin methods for debugging it. If the extension is acting up and the debugging log is not providing information. Add the following to your LocalSettings.php. This should not be run in a production forum as it may expose sensitive details
180
+
MediaWiki has built-in methods for debugging it. If the extension is acting up and the debugging log is not providing information. Add the following to your `LocalSettings.php`. This should not be run in a production forum, as it may expose sensitive details
155
181
156
182
$wgShowExceptionDetails = true;
157
183
$wgShowSQLErrors = true;
@@ -162,9 +188,8 @@ Remove when you are done debugging.
162
188
----
163
189
Getting New SMF Forks In
164
190
------------------------
165
-
If you are familiar with how your fork's authentication works, feel free to submit a pull request.
191
+
If you know how your fork's authentication works, feel free to submit a pull request.
166
192
167
193
Issues or changes
168
194
------------------------
169
-
If an issue has occurred, please open a new issue. If you have a change, please submit a pull request.
170
-
195
+
If a bug has occurred, please open a new issue. If you have a change, please submit a pull request.
0 commit comments