Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
slapos.core
Commits
9766ac0a
Commit
9766ac0a
authored
Jul 09, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide Google AS extraction.
parent
a535186e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
18 deletions
+93
-18
master/product/Vifib/VifibCookieHashExtractionPlugin.py
master/product/Vifib/VifibCookieHashExtractionPlugin.py
+47
-18
master/product/Vifib/__init__.py
master/product/Vifib/__init__.py
+10
-0
master/product/Vifib/www/Vifib_addVifibGoogleServerExtractionPlugin.zpt
.../Vifib/www/Vifib_addVifibGoogleServerExtractionPlugin.zpt
+36
-0
No files found.
master/product/Vifib/VifibCookieHashExtractionPlugin.py
View file @
9766ac0a
...
@@ -36,24 +36,6 @@ from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
...
@@ -36,24 +36,6 @@ from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
from
Products.PluggableAuthService.PluggableAuthService
import
DumbHTTPExtractor
from
Products.PluggableAuthService.PluggableAuthService
import
DumbHTTPExtractor
from
Products.ERP5Type.Cache
import
DEFAULT_CACHE_SCOPE
from
Products.ERP5Type.Cache
import
DEFAULT_CACHE_SCOPE
#Form for new plugin in ZMI
manage_addVifibFacebookServerExtractionPluginForm
=
PageTemplateFile
(
'www/Vifib_addVifibFacebookServerExtractionPlugin'
,
globals
(),
__name__
=
'manage_addVifibFacebookServerExtractionPluginForm'
)
def
addVifibFacebookServerExtractionPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a VifibFacebookServerExtractionPlugin to a Pluggable Auth Service. """
plugin
=
VifibFacebookServerExtractionPlugin
(
id
,
title
)
dispatcher
.
_setObject
(
plugin
.
getId
(),
plugin
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'VifibFacebookServerExtractionPlugin+added.'
%
dispatcher
.
absolute_url
())
class
VifibCookieHashExtractionPlugin
(
BasePlugin
):
class
VifibCookieHashExtractionPlugin
(
BasePlugin
):
"""
"""
Plugin to authenicate as machines.
Plugin to authenicate as machines.
...
@@ -116,6 +98,24 @@ class VifibCookieHashExtractionPlugin(BasePlugin):
...
@@ -116,6 +98,24 @@ class VifibCookieHashExtractionPlugin(BasePlugin):
return
creds
return
creds
return
DumbHTTPExtractor
().
extractCredentials
(
request
)
return
DumbHTTPExtractor
().
extractCredentials
(
request
)
#Form for new plugin in ZMI
manage_addVifibFacebookServerExtractionPluginForm
=
PageTemplateFile
(
'www/Vifib_addVifibFacebookServerExtractionPlugin'
,
globals
(),
__name__
=
'manage_addVifibFacebookServerExtractionPluginForm'
)
def
addVifibFacebookServerExtractionPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a VifibFacebookServerExtractionPlugin to a Pluggable Auth Service. """
plugin
=
VifibFacebookServerExtractionPlugin
(
id
,
title
)
dispatcher
.
_setObject
(
plugin
.
getId
(),
plugin
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'VifibFacebookServerExtractionPlugin+added.'
%
dispatcher
.
absolute_url
())
class
VifibFacebookServerExtractionPlugin
(
VifibCookieHashExtractionPlugin
):
class
VifibFacebookServerExtractionPlugin
(
VifibCookieHashExtractionPlugin
):
cache_factory_name
=
'facebook_server_auth_token_cache_factory'
cache_factory_name
=
'facebook_server_auth_token_cache_factory'
cookie_name
=
'__ac_facebook_hash'
cookie_name
=
'__ac_facebook_hash'
...
@@ -127,3 +127,32 @@ classImplements( VifibFacebookServerExtractionPlugin,
...
@@ -127,3 +127,32 @@ classImplements( VifibFacebookServerExtractionPlugin,
)
)
InitializeClass
(
VifibFacebookServerExtractionPlugin
)
InitializeClass
(
VifibFacebookServerExtractionPlugin
)
#Form for new plugin in ZMI
manage_addVifibGoogleServerExtractionPluginForm
=
PageTemplateFile
(
'www/Vifib_addVifibGoogleServerExtractionPlugin'
,
globals
(),
__name__
=
'manage_addVifibGoogleServerExtractionPluginForm'
)
def
addVifibGoogleServerExtractionPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a VifibGoogleServerExtractionPlugin to a Pluggable Auth Service. """
plugin
=
VifibGoogleServerExtractionPlugin
(
id
,
title
)
dispatcher
.
_setObject
(
plugin
.
getId
(),
plugin
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'VifibGoogleServerExtractionPlugin+added.'
%
dispatcher
.
absolute_url
())
class
VifibGoogleServerExtractionPlugin
(
VifibCookieHashExtractionPlugin
):
cache_factory_name
=
'google_server_auth_token_cache_factory'
cookie_name
=
'__ac_google_hash'
meta_type
=
"Vifib Google Server Extraction Plugin"
#List implementation of class
classImplements
(
VifibGoogleServerExtractionPlugin
,
plugins
.
ILoginPasswordHostExtractionPlugin
)
InitializeClass
(
VifibGoogleServerExtractionPlugin
)
master/product/Vifib/__init__.py
View file @
9766ac0a
...
@@ -79,7 +79,17 @@ def initialize(context):
...
@@ -79,7 +79,17 @@ def initialize(context):
,
icon
=
'www/portal.gif'
,
icon
=
'www/portal.gif'
)
)
context
.
registerClass
(
VifibCookieHashExtractionPlugin
.
VifibGoogleServerExtractionPlugin
,
permission
=
ManageUsers
,
constructors
=
(
VifibCookieHashExtractionPlugin
.
manage_addVifibGoogleServerExtractionPluginForm
,
VifibCookieHashExtractionPlugin
.
addVifibGoogleServerExtractionPlugin
,
)
,
visibility
=
None
,
icon
=
'www/portal.gif'
)
registerMultiPlugin
(
VifibMachineAuthenticationPlugin
.
VifibMachineAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
VifibMachineAuthenticationPlugin
.
VifibMachineAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
VifibShadowAuthenticationPlugin
.
VifibShadowAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
VifibShadowAuthenticationPlugin
.
VifibShadowAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibGoogleServerExtractionPlugin
.
meta_type
)
master/product/Vifib/www/Vifib_addVifibGoogleServerExtractionPlugin.zpt
0 → 100644
View file @
9766ac0a
<h1 tal:replace="structure context/manage_page_header">PAGE HEADER</h1>
<h2 tal:define="form_title string:Add ERP5 Google Server Extraction Plugin"
tal:replace="structure context/manage_form_title">FORM TITLE</h2>
<p class="form-help">Please input the configuration</p>
<form action="addVifibGoogleServerExtractionPlugin" method="POST">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td colspan="2"> <input type="submit" value="add plugin"/>
</td>
</tr>
</table>
</form>
<h1 tal:replace="structure context/manage_page_footer">PAGE FOOTER</h1>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment