I hereby claim:
- I am marcoow on github.
- I am marcoow (https://keybase.io/marcoow) on keybase.
- I have a public key whose fingerprint is 0EC5 B0E0 3A33 1DA0 6B2F 23F8 48F6 64E9 7230 3B2D
To claim this, I am signing this object:
import Adapter from "ember-data/adapters/json-api"; | |
export default Adapter.extend(); |
import Ember from 'ember'; | |
const { computed, Object: O } = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
things: [ | |
O.create({ value: 1 }), | |
O.create({ value: 2 }), | |
O.create({ value: 3 }) |
I hereby claim:
To claim this, I am signing this object:
Ember.Application.initializer({ | |
name: 'authentication', | |
initialize: function(container, application) { | |
Ember.SimpleAuth.setup(container, application, { | |
authorizerFactory: 'authorizer:oauth2-bearer' | |
}); | |
} | |
}); |
Ember.Application.initializer({ | |
name: 'authentication', | |
initialize: function(container, application) { | |
// customize the session so that it allows access to the account object | |
Ember.SimpleAuth.Session.reopen({ | |
account: function() { | |
var accountId = this.get('account_id'); | |
if (!Ember.isEmpty(accountId)) { | |
return container.lookup('store:main').find('account', accountId); | |
} |
Ember.Application.initializer({ | |
name: 'authentication', | |
initialize: function(container, application) { | |
Ember.SimpleAuth.setup(container, application); | |
} | |
}); | |
App.Router.map(function() { | |
this.route('login'); | |
this.route('protected'); |
App.Router.map(function() { | |
this.route('protected'); | |
}); | |
App.ProtectedRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin); |
<form {{action authenticate on='submit'}}> | |
<label for="identification">Login</label> | |
{{input id='identification' placeholder='Enter Login' value=identification}} | |
<label for="password">Password</label> | |
{{input id='password' placeholder='Enter Password' type='password' value=password}} | |
<button type="submit">Login</button> | |
</form> |
App.ApplicationRoute = Ember.Route.extend(Ember.SimpleAuth.ApplicationRouteMixin); |