This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auth-example-frontend/app/authenticators/oauth2.js | |
import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant'; | |
import config from 'my-app/config/environment'; | |
const host = config.apiUrl || ''; | |
const namespace = config.apiNamespace; | |
const serverTokenEndpoint = [ host, namespace, 'token' ]; | |
export default OAuth2PasswordGrant.extend({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auth-example-frontend/app/authenticators/oauth2.js | |
import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant'; | |
export default OAuth2PasswordGrant.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ember g authenticator oauth2 --base-class=oauth2 | |
installing authenticator | |
create app/authenticators/oauth2.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ember g authenticator oauth2 --base-class=oauth2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auth-example-frontend/app/adapters/application.js | |
import JSONAPIAdapter from 'ember-data/adapters/json-api'; | |
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin'; | |
import config from 'my-app/config/environment'; | |
export default JSONAPIAdapter.extend(DataAdapterMixin, { | |
host: config.apiUrl, | |
namespace: config.apiNamespace, | |
authorizer: 'authorizer:application' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auth-example-frontend/app/adapters/application.js | |
import DS from 'ember-data'; | |
export default DS.JSONAPIAdapter.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ember g adapter application | |
installing adapter | |
create app/adapters/application.js | |
installing adapter-test | |
create tests/unit/adapters/application-test.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ember install ember-simple-auth | |
NPM: Installed ember-simple-auth | |
Installed addon package. |