• csillag's avatar
    Added CodeAuth plugin, which can expose user authentication functions from the host/guest side · 151af483
    csillag authored
    If you load this plugin (which is disabled by default), these methods
    can be used for integrating H login mechanism with code living
    on the host page:
    
     * annotator.getLoginStatus()
     * annotator.loginWithUsernameAndPassword(username, password)
     * annotator.logout()
     * annotator.registerUser(username, email, password)
    
    These all return promises.
    
    Furtheremore, the following events have been introduced:
    
     * annotatorLogin, upon successfull login
     * annototorLogout, upon log out
    
    Note: these events are *not* fired in cases when the events were
    triggered by a call from the given host/guest-side annotator instance;
    use the promises to react those events. The events only happen if
    these events were triggered from the sidebar, or from other host/guest
    frames.
    151af483
codeauth.coffee 2.77 KB