Class EtherpadLite::Session
In: lib/etherpad-lite/models/session.rb
Parent: Object

An Etherpad Lite Session between a Group and an Author. See those classes for examples of how to create a session.

Sessions are useful for embedding an Etherpad Lite Pad into a external application. For public pads, sessions are not necessary. However Group pads require a Session to access to the pad via the Web UI.

Generally, you will create the session server side, then pass its id to the embedded pad using a cookie. See the README for an example in a Rails app.

Methods

author   author_id   create   delete   expired?   group   group_id   new   valid?   valid_until  

Attributes

id  [R]  The session id
instance  [R]  The EtherpadLite::Instance object

Public Class methods

Creates a new Session between a Group and an Author. The session will expire after length_in_min.

Instantiates a Session object (presumed to already exist)

Public Instance methods

Returns the Session‘s author

Returns the Session‘s author id

Deletes the Session

Returns true if the session is expired

Returns the Session‘s group

Returns the Session‘s group id

Returns true if the session is not expired

Returns the Session‘s expiration date is a Unix timestamp in seconds

[Validate]