Back to index

plone3  3.1.7
Namespaces | Functions | Variables
PluggableAuthService Namespace Reference

Namespaces

namespace  events
namespace  exportimport
namespace  Extensions
namespace  interfaces
namespace  permissions
namespace  PluggableAuthService
namespace  plugins
namespace  PropertiedUser
namespace  tests
namespace  UserPropertySheet
namespace  utils
namespace  zcml

Functions

def manage_zmi_logout
def initialize

Variables

 profile_registry = None

Function Documentation

Definition at line 108 of file __init__.py.

00108 
00109 def initialize(context):
00110 
00111     context.registerClass( PluggableAuthService.PluggableAuthService
00112                          , permission=ManageUsers
00113                          , constructors=(
00114                             PluggableAuthService.addPluggableAuthService, )
00115                          , icon='www/PluggableAuthService.png'
00116                          )
00117 
00118     context.registerClass( HBAH.HTTPBasicAuthHelper
00119                          , permission=ManageUsers
00120                          , constructors=(
00121                             HBAH.manage_addHTTPBasicAuthHelperForm,
00122                             HBAH.addHTTPBasicAuthHelper, )
00123                          , visibility=None
00124                          , icon='plugins/www/HTTPBasicAuthHelper.png'
00125                          )
00126 
00127     context.registerClass( IAH.InlineAuthHelper
00128                          , permission=ManageUsers
00129                          , constructors=(
00130                             IAH.manage_addInlineAuthHelperForm,
00131                             IAH.addInlineAuthHelper, )
00132                          , visibility=None
00133                          , icon='plugins/www/InlineAuthHelper.png'
00134                          )
00135 
00136     context.registerClass( CAH.CookieAuthHelper
00137                          , permission=ManageUsers
00138                          , constructors=(
00139                             CAH.manage_addCookieAuthHelperForm,
00140                             CAH.addCookieAuthHelper, )
00141                          , visibility=None
00142                          , icon='plugins/www/CookieAuthHelper.gif'
00143                          )
00144 
00145     context.registerClass( DAH.DomainAuthHelper
00146                          , permission=ManageUsers
00147                          , constructors=(
00148                             DAH.manage_addDomainAuthHelperForm,
00149                             DAH.manage_addDomainAuthHelper, )
00150                          , visibility=None
00151                          , icon='plugins/www/DomainAuthHelper.png'
00152                          )
00153 
00154     context.registerClass( SAH.SessionAuthHelper
00155                          , permission=ManageUsers
00156                          , constructors=(
00157                             SAH.manage_addSessionAuthHelperForm,
00158                             SAH.manage_addSessionAuthHelper, )
00159                          , visibility=None
00160                          , icon='plugins/www/SessionAuthHelper.gif'
00161                          )
00162 
00163     context.registerClass( ScriptablePlugin.ScriptablePlugin
00164                          , permission=ManageUsers
00165                          , constructors=(
00166                             ScriptablePlugin.manage_addScriptablePluginForm,
00167                             ScriptablePlugin.addScriptablePlugin, )
00168                          , visibility=None
00169                          , icon='plugins/www/ScriptablePlugin.png'
00170                          )
00171 
00172     context.registerClass( ZODBGroupManager.ZODBGroupManager
00173                          , permission=ManageGroups
00174                          , constructors=(
00175                             ZODBGroupManager.manage_addZODBGroupManagerForm,
00176                             ZODBGroupManager.addZODBGroupManager, )
00177                          , visibility=None
00178                          , icon='plugins/www/ZODBGroupManager.gif'
00179                          )
00180 
00181     context.registerClass( ZODBUserManager.ZODBUserManager
00182                          , permission=ManageUsers
00183                          , constructors=(
00184                             ZODBUserManager.manage_addZODBUserManagerForm,
00185                             ZODBUserManager.addZODBUserManager, )
00186                          , visibility=None
00187                          , icon='plugins/www/ZODBUserManager.gif'
00188                          )
00189 
00190     context.registerClass( ZODBRoleManager.ZODBRoleManager
00191                          , permission=ManageUsers
00192                          , constructors=(
00193                             ZODBRoleManager.manage_addZODBRoleManagerForm,
00194                             ZODBRoleManager.addZODBRoleManager, )
00195                          , visibility=None
00196                          , icon='plugins/www/ZODBRoleManager.gif'
00197                          )
00198 
00199     context.registerClass( LocalRolePlugin.LocalRolePlugin
00200                          , permission=ManageUsers
00201                          , constructors=(
00202                             LocalRolePlugin.manage_addLocalRolePluginForm,
00203                             LocalRolePlugin.addLocalRolePlugin, )
00204                          , visibility=None
00205                          , icon='plugins/www/ZODBRoleManager.gif'
00206                          )
00207 
00208     context.registerClass( DMP.DelegatingMultiPlugin
00209                          , permission=ManageUsers
00210                          , constructors=(
00211                             DMP.manage_addDelegatingMultiPluginForm,
00212                             DMP.manage_addDelegatingMultiPlugin, )
00213                          , visibility=None
00214                          , icon='plugins/www/DelegatingMultiPlugin.png'
00215                          )
00216 
00217     context.registerClass( SPP.SearchPrincipalsPlugin
00218                          , permission=ManageUsers
00219                          , constructors=(
00220                             SPP.addSearchPrincipalsPluginForm,
00221                             SPP.addSearchPrincipalsPlugin, )
00222                          , visibility=None
00223                          , icon='plugins/www/DelegatingMultiPlugin.png'
00224                          )
00225 
00226     context.registerClass( RGP.RecursiveGroupsPlugin
00227                          , permission=ManageUsers
00228                          , constructors=(
00229                             RGP.manage_addRecursiveGroupsPluginForm,
00230                             RGP.addRecursiveGroupsPlugin, )
00231                          , visibility=None
00232                          , icon='plugins/www/RecursiveGroupsPlugin.png'
00233                          )
00234 
00235     context.registerClass( DGP.DynamicGroupsPlugin
00236                          , permission=ManageUsers
00237                          , constructors=(
00238                             DGP.manage_addDynamicGroupsPluginForm,
00239                             DGP.addDynamicGroupsPlugin, )
00240                          , visibility=None
00241                          , icon='plugins/www/DynamicGroupsPlugin.png'
00242                          )
00243 
00244     context.registerClass( CPC.ChallengeProtocolChooser
00245                          , permission=ManageUsers
00246                          , constructors=(
00247                             CPC.manage_addChallengeProtocolChooserForm,
00248                             CPC.addChallengeProtocolChooserPlugin, )
00249                          , visibility=None
00250                          , icon='plugins/www/DelegatingMultiPlugin.png'
00251                          )
00252 
00253     context.registerClass( RTS.RequestTypeSniffer
00254                          , permission=ManageUsers
00255                          , constructors=(
00256                             RTS.manage_addRequestTypeSnifferForm,
00257                             RTS.addRequestTypeSnifferPlugin, )
00258                          , visibility=None
00259                          , icon='plugins/www/DelegatingMultiPlugin.png'
00260                          )
00261 
00262     if profile_registry is not None:
00263 
00264         context.registerClass( PluggableAuthService.PluggableAuthService
00265                              , meta_type='Configured PAS'
00266                              , permission=ManageUsers
00267                              , constructors=(
00268                                 PluggableAuthService.addConfiguredPASForm,
00269                                 PluggableAuthService.addConfiguredPAS,
00270                                )
00271                              , icon='www/PluggableAuthService.png'
00272                              )
00273         profile_registry.registerProfile('simple',
00274                                          'Simple PAS Content Profile',
00275                                          'Content for a simple PAS.',
00276                                          'profiles/simple',
00277                                          'PluggableAuthService',
00278                                          BASE,
00279                                          IPluggableAuthService,
00280                                         )
00281         profile_registry.registerProfile('empty',
00282                                          'Empty PAS Content Profile',
00283                                          'Content for an empty PAS '
00284                                          '(plugins registry only).',
00285                                          'profiles/empty',
00286                                          'PluggableAuthService',
00287                                          BASE,
00288                                          IPluggableAuthService,
00289                                         )
def PluggableAuthService.manage_zmi_logout (   self,
  REQUEST,
  RESPONSE 
)
Logout current user

Definition at line 80 of file __init__.py.

00080 
00081 def manage_zmi_logout(self, REQUEST, RESPONSE):
00082     """Logout current user"""
00083     p = getattr(REQUEST, '_logout_path', None)
00084     if p is not None:
00085         return apply(self.restrictedTraverse(p))
00086 
00087     acl_users = self.acl_users
00088     realm=RESPONSE.realm
00089     RESPONSE.setHeader('WWW-Authenticate', 'basic realm="%s"' % realm, 1)
00090 
00091     if IPluggableAuthService.providedBy(acl_users):
00092         acl_users.resetCredentials(REQUEST, RESPONSE)
00093     else:
00094         raise Unauthorized, '<p>You have been logged out.</p>'
00095 
00096     RESPONSE.setStatus(401)
00097     RESPONSE.setBody("""<html>
00098 <head><title>Logout</title></head>
00099 <body>
00100 <p>
00101 You have been logged out.
00102 </p>
00103 </body>
00104 </html>""")
00105 
Navigation.manage_zmi_logout = manage_zmi_logout

Variable Documentation

Definition at line 71 of file __init__.py.