Skip to content

Instantly share code, notes, and snippets.

@jordpo
Created July 10, 2017 12:28
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 jordpo/485ff6b7bac9106e632a29117ef41d06 to your computer and use it in GitHub Desktop.
Save jordpo/485ff6b7bac9106e632a29117ef41d06 to your computer and use it in GitHub Desktop.
Headers
headers: computed('session.isAuthenticated', {
get() {
const headers = {};
const session = get(this, 'session');
if (get(session, 'isAuthenticated')) {
session.authorize('authorizer:oauth', (headerName, headerValue) => {
headers[headerName] = headerValue;
});
}
return headers;
},
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment