WeChat Login module
Edition |
Incubator (services) |
||
Issues |
|||
Git |
|||
Latest |
1.0-SNAPSHOT
|
The WeChat Login module allows you to integrate Magnolia’s login mechanism with that provided to WeChat’s Open Platform. Once enabled, visitors have to scan a Wechat QR code and can access protected content of the website, e.g. members-only pages.
This module is at the INCUBATOR level. This module is not in the Magnolia platform support scope |
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
<dependency>
<groupId>info.magnolia.wechat</groupId>
<artifactId>magnolia-sso-connector</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>info.magnolia.connector.sso</groupId>
<artifactId>magnolia-sso-connector</artifactId>
<version>2.7.4</version>
</dependency>
Configuration
This module integrates open id connect provider WeChat as an authentication method for Magnolia CMS. It uses the SSO Connector module and adds configuration for this service.
For full details about the WeChat platform please refer to WeChat Login. |
-
AdminCentral login with WeChat
-
AdminCentral login with Magnolia (.magnlia/defaultlogin)
-
Login button beside the login link of travel demo.
-
Page /travel/members/wechat as the default target of the login process with WeChat.
-
Page /travel/members/wechat-profile as the user profile page.
JAAS configuration for OAuth authentication
Magnolia’s web app has to provide a special JAAS configuration for the SSO Connector Module. Add the following at the bottom of the file:
sso-authentication {
info.magnolia.connector.sso.jaas.SSOAuthenticationModule requisite;
info.magnolia.jaas.sp.jcr.JCRAuthorizationModule required;
};
loginHandlers
configuration
class info.magnolia.cms.security.auth.login.SSOAuthenticationLoginFilter
Logout configuration
class info.magnolia.cms.security.auth.logout.SSOLogoutFilter
securityCallback configuration
This is found at /server/filters/securityCallback/clientCallbacks
.
Example
travel-demo-pur
(if we have travel demo site)
public-sso (*/server/filters/securityCallback/clientCallbacks/public-sso/originalUrlPattern *)
patternString (*|travel)/members/(wechat)*
form (/server/filters/securityCallback/clientCallbacks/admincentral-sso/originalUrlPattern)
patternString /.magnolia/defaultlogin
admincentral-sso (no originalUrlPattern)
WeChat Service configuration
Configure Wechat’s API service (appid
, clilentSecret
, endpoint
, etc. ) under /modules/sso-connector/config/authenticationServices/wechatService
.
Item | Description |
---|---|
|
the callback URL after login. It should different for author and public |
|
`http://localhost:8080` |
|
`http://localhost:8080/magnoliaPublic/travel/members/wechat` |
|
magnolia user group for logged user. Default is |
Changelog
Version | Notes |
---|---|
|
Initial release of the module. |
If you need, you can download the JAR file. |