Created
July 10, 2017 12:28
-
-
Save jordpo/485ff6b7bac9106e632a29117ef41d06 to your computer and use it in GitHub Desktop.
Headers
This file contains 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
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