5.10.4.2. Configure tenant paths
You can use the quarkus.oidc.tenant-paths configuration property for resolving the tenant identifier as an alternative to using io.quarkus.oidc.TenantResolver. Here is how you can select the hr tenant for the sayHello endpoint of the HelloResource resource used in the previous example:
quarkus.oidc.hr.tenant-paths=/api/hello
quarkus.oidc.a.tenant-paths=/api/*
quarkus.oidc.b.tenant-paths=/*/hello
- 1
- Same path-matching rules apply as for the
quarkus.http.auth.permission.authenticated.paths=/api/helloconfiguration property from the previous example. - 2
- The wildcard placed at the end of the path represents any number of path segments. However the path is less specific than the
/api/hello, therefore thehrtenant will be used to secure thesayHelloendpoint. - 3
- The wildcard in the
/*/hellorepresents exactly one path segment. Nevertheless, the wildcard is less specific than theapi, therefore thehrtenant will be used.
ヒント
Path-matching mechanism works exactly same as in the Authorization using configuration.