Access Control Example
The Implementing Access Control page has been updated with links to the relevant areas on how to implement access control.
As part of the effort to help ATSs implement Access Control, the following have been added:
hapiApi
additions
jwtHeaderValuePrefix
which is used when attaching thex-authorization
header to the request headers. The default isBearer TOKENHERE
and the setter functionsetJWTHeaderValuePrefix
responseInterceptorId
andresponseInterceptorOptions
to be able to add response interceptor so that any response with status401
can run side effectsretryOptions
for theaxios-retry
package so it can be changedonAfterResponseFulfilledHandler
andonAfterResponseRejectedHandler
callback functions to run side effects on response statusremoveResponseInterceptorFromAxiosInstance
andaddResponseInterceptorToAxiosInstance
to eject and inject the response interceptor based on values ofonAfterResponseFulfilledHandler
andonAfterResponseRejectedHandler
getModuleConfigs
,getFlattenedModuleConfigs
,getFlattenedModuleConfigURLs
,getFlattenedModuleConfigURLPaths
functions to help ATSs figure out routes of HAPI Backend for their Access Control implementations