• Robert Knight's avatar
    Fetch access tokens and add Authorization header to API requests · 4b03e69d
    Robert Knight authored
    Remove the global HTTP interceptor provided by angular-jwt which added
    the Authorization header to API requests and replace it with explicit
    logic in `createAPICall` to do the same thing.
    
    This will enable replacing the JWT tokens with opaque access tokens when
    using a publisher-provided grant token for authentication.
    
    It also provides a more explicit way to only include the access token
    with requests to the API, rather than filtering based on the URL prefix
    of the request in the `tokenGetter` implementation.
    
     * Remove angular-jwt's HTTP interceptor and replace it with logic in
       store.js to explicitly fetch an access token using the `auth` module
       and add an Authorization header to API requests.
    
     * Convert standalone functions and global variables in auth.js to
       methods on the auth service. This will enable swapping out the
       current auth service implementation which uses cookies + CSRF
       for authentication with one that uses the OAuth grant token.
    
     * Fix several cases in store-test.js where functions that made
       assertions inside Promise callbacks did not explicitly wait for the
       Promise to resolve before finishing the test.
    4b03e69d
Name
Last commit
Last update
..
integration Loading commit data...
annotation-fixtures.js Loading commit data...
annotation-mapper-test.js Loading commit data...
annotation-metadata-test.js Loading commit data...
annotation-ui-test.js Loading commit data...
annotation-viewer-controller-test.js Loading commit data...
app-controller-test.js Loading commit data...
auth-test.js Loading commit data...
bootstrap.js Loading commit data...
build-thread-test.js Loading commit data...
drafts-test.js Loading commit data...
fake-redux-store.js Loading commit data...
features-test.js Loading commit data...
form-respond-test.coffee Loading commit data...
frame-sync-test.js Loading commit data...
groups-test.js Loading commit data...
host-test.coffee Loading commit data...
local-storage-test.coffee Loading commit data...
login-form-test.coffee Loading commit data...
markdown-commands-test.js Loading commit data...
media-embedder-test.js Loading commit data...
permissions-test.coffee Loading commit data...
raven-test.js Loading commit data...
render-markdown-test.js Loading commit data...
retry-util-test.js Loading commit data...
root-thread-test.js Loading commit data...
search-client-test.js Loading commit data...
search-filter-test.coffee Loading commit data...
service-url-test.js Loading commit data...
session-test.js Loading commit data...
store-test.js Loading commit data...
stream-controller-test.coffee Loading commit data...
streamer-test.js Loading commit data...
tabs-test.js Loading commit data...
tags-test.coffee Loading commit data...
time-test.js Loading commit data...
unicode-test.coffee Loading commit data...
view-filter-test.coffee Loading commit data...
virtual-thread-list-test.js Loading commit data...
websocket-test.js Loading commit data...
widget-controller-test.js Loading commit data...