Change comment:
Added doc for Groovy authenticator
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -143,7 +143,7 @@ 143 143 1.1 Custom Authentication 144 144 145 145 This allows plugging to any existing authentication mechanism such as SiteMinder, etc. To configure a custom authentication do the following: 146 -# Implement the XWikiAuthService interface. 146 +# Implement the [XWikiAuthService>http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiAuthService.java] interface. 147 147 # Edit the ~~WEB-INF/xwiki.cfg~~ file and add a ~~xwiki.authentication.authclass~~ property pointing to your class. For example: 148 148 149 149 {code} ... ... @@ -152,17 +152,33 @@ 152 152 153 153 Here's a [tutorial on implementing a custom authentication class for authenticating against Oracle's SSO>http://bodez.wordpress.com/2008/10/15/xwiki-user-authentication-with-oracle-sso/]. 154 154 155 -Note, that you also can implement own right management service by implementing XWikiRightService interface: 155 +Note, that you also can implement own right management service by implementing [XWikiRightService>http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiRightService.java] interface: 156 156 {code} 157 157 xwiki.authentication.rightsclass = com.acme.MyCustomRightsService 158 158 {code} 159 159 160 -and groupservice by implementing XWikiGroupServiceand setting ~~xwiki.authentication.groupclass~~property.160 +and Group Service by implementing [XWikiGroupService>http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java]: 161 161 162 +{code} 163 +xwiki.authentication.groupclass = com.acme.MyCustomGroupService 164 +{code} 162 162 166 +1.1.1 Custom Authentication using a Groovy script in a wiki page 163 163 168 +Start by specifying you want to use the Groovy Authenticator: 164 164 170 +{code} 171 +xwiki.authentication.authclass = com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl 172 +{code} 165 165 174 +Then add another configuration parameter to specify in which wiki page the authenticator is: 175 + 176 +{code} 177 +xwiki.authentication.groovy.pagename = MySpace.MyPage 178 +{code} 179 + 180 +Then in a wiki page put some Groovy code that returns a XWikiAuthService object. 181 + 166 166 1.1 Authentication parameters 167 167 168 168 You can set each of these parameters by setting: