Skip to content

Instantly share code, notes, and snippets.

@renefs
Created June 13, 2017 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renefs/9b3870513bc345c347d3111533985fb3 to your computer and use it in GitHub Desktop.
Save renefs/9b3870513bc345c347d3111533985fb3 to your computer and use it in GitHub Desktop.
Yuidoc Ember example
import Ember from 'ember';
/**
* The login controller shows the login form and sends authentication data to the session.
*
* @class login
* @namespace Controller
*/
export default Ember.Controller.extend({
/**
* The session service.
*
* @property session
* @readOnly
* @type Service
*/
session: Ember.inject.service('session'),
/**
* The identification, usually an username or e-mailaddress.
*
* @property identification
* @type String
* @default null
*/
identification: '',
/**
* The password.
*
* @property password
* @type String
* @default null
*/
password: '',
actions: {
/**
* The authenticate action sends the identification and password to the session.
*
* @event authenticate
* @return undefined
*/
authenticate() {
this.get('session').authenticate('authenticator:jwt', this.getProperties('identification', 'password'));
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment