Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Mikolaï Krol
erp5
Commits
a50fee6e
Commit
a50fee6e
authored
Sep 25, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_oauth_facebook_login: Initial Commit
Include draft of facebook Oauth code.
parent
a3e448f1
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
706 additions
and
0 deletions
+706
-0
bt5/erp5_oauth_facebook_login/ActionTemplateItem/portal_types/Facebook%20Login/view.xml
...ActionTemplateItem/portal_types/Facebook%20Login/view.xml
+85
-0
bt5/erp5_oauth_facebook_login/ExtensionTemplateItem/portal_components/extension.erp5.FacebookLoginUtility.py
.../portal_components/extension.erp5.FacebookLoginUtility.py
+11
-0
bt5/erp5_oauth_facebook_login/ExtensionTemplateItem/portal_components/extension.erp5.FacebookLoginUtility.xml
...portal_components/extension.erp5.FacebookLoginUtility.xml
+123
-0
bt5/erp5_oauth_facebook_login/PathTemplateItem/portal_caches/facebook_server_auth_token_cache_factory.xml
...ortal_caches/facebook_server_auth_token_cache_factory.xml
+76
-0
bt5/erp5_oauth_facebook_login/PathTemplateItem/portal_caches/facebook_server_auth_token_cache_factory/persistent_cache_plugin.xml
...rver_auth_token_cache_factory/persistent_cache_plugin.xml
+28
-0
bt5/erp5_oauth_facebook_login/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+5
-0
bt5/erp5_oauth_facebook_login/PortalTypeTemplateItem/portal_types/Facebook%20Login.xml
.../PortalTypeTemplateItem/portal_types/Facebook%20Login.xml
+76
-0
bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+6
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login.xml
...inTemplateItem/portal_skins/erp5_oauth_facebook_login.xml
+26
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.py
...p5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.py
+46
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.xml
...5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.xml
+70
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_getFacebookAccessTokenFromCode.xml
...acebook_login/ERP5Site_getFacebookAccessTokenFromCode.xml
+28
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_getFacebookUserEntry.xml
...p5_oauth_facebook_login/ERP5Site_getFacebookUserEntry.xml
+28
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_redirectToFacebookLoginPage.py
...th_facebook_login/ERP5Site_redirectToFacebookLoginPage.py
+14
-0
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_redirectToFacebookLoginPage.xml
...h_facebook_login/ERP5Site_redirectToFacebookLoginPage.xml
+70
-0
bt5/erp5_oauth_facebook_login/bt/dependency_list
bt5/erp5_oauth_facebook_login/bt/dependency_list
+2
-0
bt5/erp5_oauth_facebook_login/bt/template_action_path_list
bt5/erp5_oauth_facebook_login/bt/template_action_path_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/template_extension_id_list
bt5/erp5_oauth_facebook_login/bt/template_extension_id_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/template_format_version
bt5/erp5_oauth_facebook_login/bt/template_format_version
+1
-0
bt5/erp5_oauth_facebook_login/bt/template_path_list
bt5/erp5_oauth_facebook_login/bt/template_path_list
+2
-0
bt5/erp5_oauth_facebook_login/bt/template_portal_type_allowed_content_type_list
...k_login/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/template_portal_type_id_list
...erp5_oauth_facebook_login/bt/template_portal_type_id_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list
...acebook_login/bt/template_portal_type_workflow_chain_list
+2
-0
bt5/erp5_oauth_facebook_login/bt/template_skin_id_list
bt5/erp5_oauth_facebook_login/bt/template_skin_id_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/test_dependency_list
bt5/erp5_oauth_facebook_login/bt/test_dependency_list
+1
-0
bt5/erp5_oauth_facebook_login/bt/title
bt5/erp5_oauth_facebook_login/bt/title
+1
-0
No files found.
bt5/erp5_oauth_facebook_login/ActionTemplateItem/portal_types/Facebook%20Login/view.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Login_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/ExtensionTemplateItem/portal_components/extension.erp5.FacebookLoginUtility.py
0 → 100644
View file @
a50fee6e
import
facebook
from
Products.ERP5Security.ERP5ExternalOauth2ExtractionPlugin
import
getFacebookUserEntry
def
getAccessTokenFromCode
(
self
,
code
,
redirect_uri
):
return
facebook
.
GraphAPI
(
version
=
"2.7"
).
get_access_token_from_code
(
code
=
code
,
redirect_uri
=
redirect_uri
,
app_id
=
self
.
getClientId
(),
app_secret
=
self
.
getSecretKey
())
def
getUserEntry
(
token
):
return
getFacebookUserEntry
(
token
)
\ No newline at end of file
bt5/erp5_oauth_facebook_login/ExtensionTemplateItem/portal_components/extension.erp5.FacebookLoginUtility.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Extension Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
FacebookLoginUtility
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.FacebookLoginUtility
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Extension Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/PathTemplateItem/portal_caches/facebook_server_auth_token_cache_factory.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Cache Factory"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
cache_duration
</string>
</key>
<value>
<int>
3600
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
facebook_server_auth_token_cache_factory
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Cache Factory
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/PathTemplateItem/portal_caches/facebook_server_auth_token_cache_factory/persistent_cache_plugin.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Distributed Ram Cache"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
specialise/portal_memcached/default_memcached_plugin
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
persistent_cache_plugin
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Distributed Ram Cache
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
0 → 100644
View file @
a50fee6e
<allowed_content_type_list>
<portal_type
id=
"Person"
>
<item>
Facebook Login
</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
bt5/erp5_oauth_facebook_login/PortalTypeTemplateItem/portal_types/Facebook%20Login.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<tuple>
<string>
login
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Facebook Login
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Base Type
</string>
</value>
</item>
<item>
<key>
<string>
searchable_text_property_id
</string>
</key>
<value>
<tuple>
<string>
reference
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
Login
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_mixin
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
0 → 100644
View file @
a50fee6e
<workflow_chain>
<chain>
<type>
Facebook Login
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_oauth_facebook_login
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.py
0 → 100644
View file @
a50fee6e
import
time
def
handleError
(
error
):
context
.
Base_redirect
(
'login_form'
,
keep_items
=
{
"portal_status_message"
:
context
.
Base_translateString
(
"There was problem with Facebook login: ${error}. Please try again later."
,
mapping
=
{
"error"
:
error
})
})
if
error
is
not
None
:
return
handleError
(
error
)
elif
code
is
not
None
:
portal
=
context
.
getPortalObject
()
response_dict
=
context
.
ERP5Site_getFacebookAccessTokenFromCode
(
code
,
"{0}/ERP5Site_callbackFacebookLogin"
.
format
(
context
.
absolute_url
()))
if
response_dict
is
not
None
:
access_token
=
response_dict
[
'access_token'
].
encode
(
'utf-8'
)
hash_str
=
context
.
Base_getHMAC
(
access_token
,
access_token
)
context
.
REQUEST
.
RESPONSE
.
setCookie
(
'__ac_facebook_hash'
,
hash_str
,
path
=
'/'
)
# store timestamp in second since the epoch in UTC is enough
response_dict
[
"response_timestamp"
]
=
time
.
time
()
context
.
Base_setBearerToken
(
hash_str
,
response_dict
,
"facebook_server_auth_token_cache_factory"
)
user_dict
=
context
.
ERP5Site_getFacebookUserEntry
(
access_token
)
user_reference
=
user_dict
[
"reference"
]
context
.
Base_setBearerToken
(
access_token
,
{
"reference"
:
user_reference
},
"facebook_server_auth_token_cache_factory"
)
method
=
getattr
(
context
,
"Base_createOAuth2User"
,
None
)
if
method
is
not
None
:
pass
#method("Facebook Login", user_reference, user_dict)
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
context
.
REQUEST
.
get
(
"came_from"
)
or
portal
.
absolute_url
())
return
handleError
(
''
)
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_callbackFacebookLogin.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
code=None, error=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Auditor
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_callbackFacebookLogin
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_getFacebookAccessTokenFromCode.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getAccessTokenFromCode
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
FacebookLoginUtility
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getFacebookAccessTokenFromCode
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_getFacebookUserEntry.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getUserEntry
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
FacebookLoginUtility
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getFacebookUserEntry
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_redirectToFacebookLoginPage.py
0 → 100644
View file @
a50fee6e
from
ZTUtils
import
make_query
query
=
make_query
({
# Call at he context of the appropriate web_service.
'client_id'
:
context
.
getClientId
(),
'redirect_uri'
:
"{0}/ERP5Site_callbackFacebookLogin"
.
format
(
came_from
or
context
.
absolute_url
()),
'scope'
:
'email'
})
login_url
=
"https://www.facebook.com/v2.10/dialog/oauth"
if
"?"
not
in
login_url
:
login_url
+=
"?"
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
"{0}{1}"
.
format
(
login_url
,
query
))
bt5/erp5_oauth_facebook_login/SkinTemplateItem/portal_skins/erp5_oauth_facebook_login/ERP5Site_redirectToFacebookLoginPage.xml
0 → 100644
View file @
a50fee6e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
came_from=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Auditor
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_redirectToFacebookLoginPage
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_oauth_facebook_login/bt/dependency_list
0 → 100644
View file @
a50fee6e
erp5_bearer_token
erp5_oauth
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_action_path_list
0 → 100644
View file @
a50fee6e
Facebook Login | view
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_extension_id_list
0 → 100644
View file @
a50fee6e
extension.erp5.FacebookLoginUtility
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_format_version
0 → 100644
View file @
a50fee6e
1
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_path_list
0 → 100644
View file @
a50fee6e
portal_caches/facebook_server_auth_token_cache_factory
portal_caches/facebook_server_auth_token_cache_factory/**
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_portal_type_allowed_content_type_list
0 → 100644
View file @
a50fee6e
Person | Facebook Login
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_portal_type_id_list
0 → 100644
View file @
a50fee6e
Facebook Login
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_portal_type_workflow_chain_list
0 → 100644
View file @
a50fee6e
Facebook Login | edit_workflow
Facebook Login | validation_workflow
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/template_skin_id_list
0 → 100644
View file @
a50fee6e
erp5_oauth_facebook_login
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/test_dependency_list
0 → 100644
View file @
a50fee6e
erp5_full_text_myisam_catalog
\ No newline at end of file
bt5/erp5_oauth_facebook_login/bt/title
0 → 100644
View file @
a50fee6e
erp5_oauth_facebook_login
\ No newline at end of file
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