This authenticator is used by Ember-Simple-Auth to authenticate a user on the client.

Example Usage:

import Ember from 'ember';

export default Ember.Object.extend({
    session: Ember.inject.service(),

    login(username, password) {
        let session = this.get('session');

        session.authenticate('authenticator:group-control', username, password);
    }
});

To extend in an application:

import GCAuthenticator from '@bennerinformatics/ember-fw-gc/authenticators/group-control';

export default GCAuthenticator.extend({
    // ... your custom code here
});

For more example on using this in an application or extending it, visit Ember Simple Auth's website.

Show:
authenticate
(
  • user
  • pass
  • department
)
Promise
public

Authenticates a user given a username and password.

Parameters:

  • user String

    Username to attempt login with

  • pass String

    User-provided password to attempt login with

  • department String

    Query parameter preferred department

Returns:

Promise:

Promise that resolves upon successful login, otherwise rejects

invalidate () Promise public

Invalidates a user's session. Called on logout.

Returns:

restore () Promise public

Overrides Ember-Simple-Auth's restore method.

Restores user data on page reload. If the session has expired, automatically logout the user.

Returns:

Promise:

Promise that resolves on successful restoration, otherwise rejects

ajax

AjaxService private

Injected Ajax service

config

ConfigService private

Injected Config service

currentUser

CurrentUserService private

Injected Current User service

notifications

NotificationsService private

Injected Notifications service