- Allow oauth2 clients to be configured for use with a specific
audience
, i.e., allow this module to provide an oauth2 authz server for namespaced HTTP routes. If an application serves/<namespaceA>/<namespaceB>/etc
routes, then clients can be configured to specifically only work with particular namespaces or sub-namespaces. Whenaudience
is not set on a client, it will only work with routes that are not namespaced in this way, i.e., non-namespaced and namespaced clients will not be able to access each others' resources.
- Deprecate
requestableScopes
; replaced withallowedScopes
.
- Add
getClient({clientId})
optional function to be passed toaddOAuth2AuthzServer({... getClient})
to provide an alternative client lookup mechanism. The returned client must have the same properties expressed in this module's config where oauth2 clients may be optionally specified. If desired, the providedgetClient()
function may optionally internally retrieve configured oauth2 clients (if present and in whichever order of precedence the application decides) by callinggetOAuth2ClientFromConfig()
.
- Use
secretHash
instead ofpasswordHash
(now deprecated but still available for use) in oauth2 client configuration.
- See git history for changes.