Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
PluggableAuthService.plugins.InlineAuthHelper.InlineAuthHelper Class Reference
Inheritance diagram for PluggableAuthService.plugins.InlineAuthHelper.InlineAuthHelper:
Inheritance graph
[legend]
Collaboration diagram for PluggableAuthService.plugins.InlineAuthHelper.InlineAuthHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def extractCredentials
def challenge

Public Attributes

 id
 title
 body

Static Public Attributes

string meta_type = 'Inline Auth Helper'
tuple security = ClassSecurityInfo()
tuple manage_options

Private Member Functions

def _setBody

Private Attributes

 _id

Static Private Attributes

tuple _properties

Detailed Description

Multi-plugin for managing details of Inline Authentication. 

Definition at line 68 of file InlineAuthHelper.py.


Constructor & Destructor Documentation

Definition at line 85 of file InlineAuthHelper.py.

00085 
00086     def __init__(self, id, title=None):
00087         self.id = self._id = id
00088         self.title = title
00089         self.body = BASIC_LOGIN_FORM


Member Function Documentation

def PluggableAuthService.plugins.InlineAuthHelper.InlineAuthHelper._setBody (   self,
  body,
  args,
  kw 
) [private]

Definition at line 127 of file InlineAuthHelper.py.

00127 
00128     def _setBody(self, body, *args, **kw):
00129         pass
00130 
00131 classImplements( InlineAuthHelper
00132                , IInlineAuthHelper
00133                , ILoginPasswordHostExtractionPlugin
00134                , IChallengePlugin
00135                )
00136 
00137 InitializeClass(InlineAuthHelper)
00138 

Here is the caller graph for this function:

def PluggableAuthService.plugins.InlineAuthHelper.InlineAuthHelper.challenge (   self,
  request,
  response,
  kw 
)
Challenge the user for credentials. 

Definition at line 114 of file InlineAuthHelper.py.

00114 
00115     def challenge(self, request, response, **kw):
00116         """ Challenge the user for credentials. """
00117         response.setStatus('200')
00118         response.setBody(self.body)
00119 
00120         # Keep HTTPResponse.exception() from further writing on the
00121         # response body, without using HTTPResponse.write()
00122         response._locked_status = True
00123         response.setBody = self._setBody # Keep response.exception
00124         return True

Here is the call graph for this function:

Extract credentials from cookie or 'request'. 

Definition at line 91 of file InlineAuthHelper.py.

00091 
00092     def extractCredentials(self, request):
00093         """ Extract credentials from cookie or 'request'. """
00094         creds = {}
00095 
00096         # Look in the request for the names coming from the login form
00097         login = request.get('__ac_name', '')
00098         password = request.get('__ac_password', '')
00099 
00100         if login:
00101             creds['login'] = login
00102             creds['password'] = password
00103 
00104         if creds:
00105             creds['remote_host'] = request.get('REMOTE_HOST', '')
00106 
00107             try:
00108                 creds['remote_address'] = request.getClientAddr()
00109             except AttributeError:
00110                 creds['remote_address'] = request.get('REMOTE_ADDR', '')
00111 
00112         return creds


Member Data Documentation

Definition at line 86 of file InlineAuthHelper.py.

Initial value:
( { 'id'    : 'title'
                    , 'label' : 'Title'
                    , 'type'  : 'string'
                    , 'mode'  : 'w'
                    },
                  )

Definition at line 73 of file InlineAuthHelper.py.

Definition at line 88 of file InlineAuthHelper.py.

Definition at line 86 of file InlineAuthHelper.py.

Initial value:
( BasePlugin.manage_options[:1]
                     + Folder.manage_options[:1]
                     + Folder.manage_options[2:]
                     )

Definition at line 80 of file InlineAuthHelper.py.

Definition at line 70 of file InlineAuthHelper.py.

Definition at line 71 of file InlineAuthHelper.py.

Definition at line 87 of file InlineAuthHelper.py.


The documentation for this class was generated from the following file: