The initial package which became accounts-drupal. Please use accounts-drupal instead. https://github.com/FGM/accounts-drupal
Frederic G. MARAND 79862964d0 First acceptable-looking part: SSO initialization. | 9 år sedan | |
---|---|---|
client | 9 år sedan | |
lib | 9 år sedan | |
server | 9 år sedan | |
.jshintrc | 9 år sedan | |
README.md | 9 år sedan | |
drupal-sso-tests.js | 9 år sedan | |
package.js | 9 år sedan | |
sso.js | 9 år sedan |
The Drupal SSO package provides transparent authentication integration with a Drupal instance.
meteor add fgm:drupal-sso
Configure a drupal-sso
section in your settings.json
, like:
{
'drupal-sso': {
"site": "http://example.com",
"appToken": "the application token you got from the Meteor module"
}
}
In the app startup, initialize a SSO instance: SSO = new DrupalSSO();
Once this is done, your application can use the SSO methods, passive and reactive data sources:
userId()
, userName()
, userRoles()
state.sessionName
, state.anonymousName
, state.online
You may delay until initialization by the Drupal server has completed by waiting on SSO.state.online
until it is no longer undefined
.
Unlike Meteor, Drupal relies by default on cookie-based authentication. This package makes use of the Drupal session cookie to authenticate the user with the Drupal instance having created the cookie.
It enables adding Meteor pages to a Drupal site without having to care for authentication, which is carried over from Drupal for each logged-in user.